if regex_search:
    p = re.compile(__searchtext__)
for dir, subdirs, subfiles in os.walk('c:/docs/2009'):
    for name in fnmatch.filter(subfiles, '*.txt'):
        fn = os.path.join(dir, name)
with open(fn, 'r') as f:
    pass
найти в файлах с помощью ruby ​​или python