Commits

Roger Pate committed 58855bb

Add Python program template

  • Participants
  • Parent commits 7d4b500

Comments (0)

Files changed (1)

File py-program-template.py

+#!/usr/bin/env python2.6
+"""<Short description>
+
+<Long description.>
+"""
+
+import optparse
+import sys
+
+
+def main(args):
+  op = optparse.OptionParser(usage="%prog [OPTION..]", add_help_option=False)
+  op.add_option("--help", action="help", help="show help message and exit")
+  op.disable_interspersed_args()
+  opts, args = op.parse_args(args)
+  if args:
+    op.error("unexpected arguments")
+
+  return "TODO"
+
+
+if __name__ == "__main__":
+  sys.exit(main(sys.argv[1:]))