Hello, 2010/12/30 <[email protected]>: > How can i do the same thing (wildcard in a directory name) in python please ?
You can get the contents of a directory with os.listdir and filter
with fnmatch.fnmatch more or less as in the example from the
documentation:
---------------------
import fnmatch
import os
for file in os.listdir('.'):
if fnmatch.fnmatch(file, '*.txt'):
print file
---------------------
Regards,
Javier
--
http://mail.python.org/mailman/listinfo/python-list
