Is there an alternative to os.walk?

Bruce epost2 at gmail.com
Wed Oct 4 13:30:32 EDT 2006


Hi all,
I have a question about traversing file systems, and could use some
help. Because of directories with many files in them, os.walk appears
to be rather slow. I`m thinking there is a potential for speed-up since
I don`t need os.walk to report filenames of all the files in every
directory it visits. Is there some clever way to use os.walk or another
tool that would provide functionality like os.walk except for the
listing of the filenames?




More information about the Python-list mailing list