Andrej Mitrovic wrote:
On Mar 26, 9:18 am, "Alf P. Steinbach" wrote:
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
'object'
# class,
On Mar 26, 9:18 am, "Alf P. Steinbach" 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 w
* 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
have you tried os.walk() ?
On Fri, Mar 26, 2010 at 5:55 AM, Andrej Mitrovic 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 layer. So even if there are
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.