[Tutor] turn a path into nested list
Alan Gauld
alan.gauld at btinternet.com
Thu Jan 13 18:30:25 CET 2011
"ingo" <ingoogni at gmail.com> wrote
> I have a path
>
>>>> path =
>>>> 'Audio/site-packages/pygame/examples/macosx/aliens_app_example/English.lproj'
>
> I'd like to turn taht into a list with a certain structure and
> order:
Its not clear what exactly the sort criteria is, however have you
looked
at the os.walk() function for traversing directory trees? It may be
all
you need.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list