comparison makeitso/python.py @ 102:ad5fd3eb6674

template fixes....not the best, but will do
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 11 Jan 2011 16:30:52 -0800
parents e74baa8e6df4
children 32893f67f85d
comparison
equal deleted inserted replaced
101:80a57bf2b7f4 102:ad5fd3eb6674
19 import sys 19 import sys
20 from cli import MakeItSoCLI 20 from cli import MakeItSoCLI
21 from optparse import OptionParser 21 from optparse import OptionParser
22 from template import MakeItSoTemplate 22 from template import MakeItSoTemplate
23 23
24 class PythonPackage(MakeItSoTemplate): 24 class PythonPackageTemplate(MakeItSoTemplate):
25 """ 25 """
26 python package template 26 python package template
27 """ 27 """
28 name = 'python-package' 28 name = 'python-package'
29 templates = ['python_package'] 29 templates = ['python_package']
37 } 37 }
38 38
39 def __init__(self, **kw): 39 def __init__(self, **kw):
40 MakeItSoTemplate.__init__(self, **kw) 40 MakeItSoTemplate.__init__(self, **kw)
41 41
42 class PythonPackageCLI(MakeItSoCLI):
43 """
44 CLI front end for the python package template
45 """
42 46
43 def main(args=sys.argv[:]): 47 def main(args=sys.argv[1:]):
44 usage = '%prog [options]' 48 cli = PythonPackageCLI(PythonPackageTemplate)
45 49 cli(*args)
46 50
47 if __name__ == '__main__': 51 if __name__ == '__main__':
48 main() 52 main()
49