commit | ebaad210b68934f5e40fe6d5d59fb9b2f1e76f6d | [log] [tgz] |
---|---|---|
author | Tony Mack <tmack@paris.CS.Princeton.EDU> | Sun Apr 07 20:44:28 2013 -0400 |
committer | Tony Mack <tmack@paris.CS.Princeton.EDU> | Sun Apr 07 20:44:28 2013 -0400 |
tree | 57bb868298bf2a40b74c837a4d374898dff3417d | |
parent | 963a6d08c5cf48c9e4a39b44abf7902715bd78a1 [diff] |
initial checkin
diff --git a/plstackapi/util/glob.py b/plstackapi/util/glob.py new file mode 100644 index 0000000..833ce35 --- /dev/null +++ b/plstackapi/util/glob.py
@@ -0,0 +1,8 @@ +import os, fnmatch + +def recursive_glob(treeroot, pattern): + results = [] + for base, dirs, files in os.walk(treeroot): + goodfiles = fnmatch.filter(files, pattern) + results.extend(os.path.join(base, f) for f in goodfiles) + return results