comparison makeitso/main.py @ 2:825922315ce6

make shebang work
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 04 Nov 2010 18:58:11 -0700
parents c2f8464e0395
children 8931be6d2c8a
comparison
equal deleted inserted replaced
1:c2f8464e0395 2:825922315ce6
43 else: 43 else:
44 _args.append(arg) 44 _args.append(arg)
45 args = _args 45 args = _args
46 46
47 # get the content 47 # get the content
48 content = sys.stdin.read() 48 if args:
49 template = Template(content) 49 for arg in args:
50 print template.substitute(**variables) 50 content = file(arg).read()
51 template = Template(content)
52 print template.substitute(**variables)
53 else:
54 content = sys.stdin.read()
55 template = Template(content)
56 print template.substitute(**variables)
51 57
52 58
53 if __name__ == '__main__': 59 if __name__ == '__main__':
54 main() 60 main()