Andrej Mitrovic wrote:
On Mar 26, 9:18 am, Alf P. Steinbach al...@start.no wrote:
snip
hierarchy =nspect.getclasstree( classes )
# 'hierarchy' is a list array of tuples and nested list arrays of the same form.
# The top level is an array of two items, the first item a tuple describing the
* Andrej Mitrovic:
I would like to traverse through the entire structure of dir(), and
write it to a file.
Now, if I try to write the contents of dir() to a file (via pickle), I
only get the top layer. So even if there are lists within the returned
list from dir(), they get written as a list of
On Mar 26, 9:18 am, Alf P. Steinbach al...@start.no wrote:
* Andrej Mitrovic:
I would like to traverse through the entire structure of dir(), and
write it to a file.
Now, if I try to write the contents of dir() to a file (via pickle), I
only get the top layer. So even if there are lists
I would like to traverse through the entire structure of dir(), and
write it to a file.
Now, if I try to write the contents of dir() to a file (via pickle), I
only get the top layer. So even if there are lists within the returned
list from dir(), they get written as a list of strings to the file.
have you tried os.walk() ?
On Fri, Mar 26, 2010 at 5:55 AM, Andrej Mitrovic andrej.mitrov...@gmail.com
wrote:
I would like to traverse through the entire structure of dir(), and
write it to a file.
Now, if I try to write the contents of dir() to a file (via pickle), I
only get the top