Anyway to use file masks with os.listdir()?
Oleg Broytmann
phd at phd.russ.ru
Tue Nov 16 11:45:38 EST 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.
----
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
mailing list