As a time-pass activity, I decided to implement a Tree(like) structure in python.
I implemented a Node class (which alone serves the purpose here) like so:<
I'd like to suggest to take a look at ETE module http://ete.cgenomics.org which implements the functionality you describe here and much more.
At the same time, I'd like to provide this entry Pretty Print output in a sideways tree format in console window where a similar question has been asked before. As you can see in such discussion, the _asciiArt function from ETE provides what, I think, you are looking for.
I hope this helps,