comparison makeitso/python_package/{{package}}/{{main}}.py @ 197:bb57bec165b7

fix errors with template
author Jeff Hammel <k0scist@gmail.com>
date Mon, 09 Jun 2014 20:25:45 -0700
parents d25ca7099df8
children be7e2e336d7a
comparison
equal deleted inserted replaced
196:d25ca7099df8 197:bb57bec165b7
30 def __init__(self): 30 def __init__(self):
31 argparse.ArgumentParser.__init__(self, description=__doc__) 31 argparse.ArgumentParser.__init__(self, description=__doc__)
32 self.options = None 32 self.options = None
33 33
34 def parse_args(self, *args, **kw): 34 def parse_args(self, *args, **kw):
35 options = argparse.ArgumentParser.parse_args(*args, **kw) 35 options = argparse.ArgumentParser.parse_args(self, *args, **kw)
36 self.validate(options) 36 self.validate(options)
37 self.options = options 37 self.options = options
38 return options 38 return options
39 39
40 def validate(self, options): 40 def validate(self, options):
42 42
43 def main(args=sys.argv[1:]): 43 def main(args=sys.argv[1:]):
44 """CLI""" 44 """CLI"""
45 45
46 # parse command line options 46 # parse command line options
47 parser = Parser(description=__doc__) 47 parser = Parser()
48 options = parser.parse_args(args) 48 options = parser.parse_args(args)
49 49
50 if __name__ == '__main__': 50 if __name__ == '__main__':
51 main() 51 main()