os.walk trouble

BartlebyScrivener rpdooling at gmail.com
Thu Jun 1 14:03:04 EDT 2006


>> root, dirs, files = os.walk(dirname)

If you want to do it this way, you need to stop it after the first one:

root, dirs, files = os.walk(dirname).next()
print root
print dirs
print files

see this thread

http://tinyurl.com/rmyo4




More information about the Python-list mailing list