833ce358c6166b271f37186a055875caa0c645d8
[plstackapi.git] / plstackapi / util / glob.py
1 import os, fnmatch
2
3 def recursive_glob(treeroot, pattern):
4   results = []
5   for base, dirs, files in os.walk(treeroot):
6     goodfiles = fnmatch.filter(files, pattern)
7     results.extend(os.path.join(base, f) for f in goodfiles)
8   return results