diff makeitso/python_package/{{package}}/main.py @ 79:8c326f764cfe

add a CLI template
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 08 Jan 2011 20:46:10 -0800
parents
children d9201f911458
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makeitso/python_package/{{package}}/main.py	Sat Jan 08 20:46:10 2011 -0800
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+"""
+{{description}}
+"""
+
+import sys
+from optparse import OptionParser
+
+def main(args=sys.argv[:]):
+  usage = '%prog [options]'
+  parser = OptionParser(usage=usage, description=__doc__)
+  options, args = parser.parse_args(args)
+
+if __name__ == '__main__':
+  main()