Permalink
Browse files

Add utility for taking a list of file globs and expanding them.

  • Loading branch information...
1 parent f180044 commit 369c00bd8be8ba2b0aa69645a8a06ffb9bacc73d David Scott committed May 16, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 expand-glob.py
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import sys, glob
+
+if __name__ == "__main__":
+ while True:
+ line = sys.stdin.readline().strip()
+ if line == "":
+ sys.exit(0)
+ files = glob.glob(line)
+ #if files == []:
+ # raise line
+ for file in files:
+ print file

0 comments on commit 369c00b

Please sign in to comment.