newb question: file searching

Mike Kent mrmakent at cox.net
Tue Aug 8 16:21:45 EDT 2006


jaysherby at gmail.com wrote:
> I'm new at Python and I need a little advice.  Part of the script I'm
> trying to write needs to be aware of all the files of a certain
> extension in the script's path and all sub-directories.

What you want is os.walk().

http://www.python.org/doc/current/lib/os-file-dir.html




More information about the Python-list mailing list