
January 25th, 2013, 09:03 AM
|
 |
Contributing User
|
|
|
|
Code:
>>> import os, re, glob
>>> files = os.listdir(os.curdir)
>>> select_files = [f for f in files if re.search('expression',f)]
>>> # or
>>> files = glob.glob('*.txt')
I hope one of these concepts helps. Looks like you'd need to combine with xml reader.
__________________
[code] Code tags[/code] are essential for python code!
|