# HG changeset patch # User Jeff Hammel # Date 1288922291 25200 # Node ID 825922315ce647ee653c0fa7023112b24242baa1 # Parent c2f8464e0395225940c6b2f50e4fed16dd8763e1 make shebang work diff -r c2f8464e0395 -r 825922315ce6 makeitso/main.py --- a/makeitso/main.py Wed Nov 03 08:35:16 2010 -0700 +++ b/makeitso/main.py Thu Nov 04 18:58:11 2010 -0700 @@ -45,9 +45,15 @@ args = _args # get the content - content = sys.stdin.read() - template = Template(content) - print template.substitute(**variables) + if args: + for arg in args: + content = file(arg).read() + template = Template(content) + print template.substitute(**variables) + else: + content = sys.stdin.read() + template = Template(content) + print template.substitute(**variables) if __name__ == '__main__':