Anyway to use file masks with os.listdir()?
phd at phd.russ.ru
Tue Nov 16 17:45:38 CET 1999
On Tue, 16 Nov 1999, Aaron J Reichow wrote:
> Is there any way to pass a filemask to os.listdir()? For example, to list
> only files with the extension .jpg. Any help would be appreciated! :)
Module fnmatch.py is your friend.
Oleg Broytmann Foundation for Effective Policies phd at phd.russ.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list