# HG changeset patch # User Jeff Hammel # Date 1354419346 28800 # Node ID ebc5cfe17d95f7491e24d0a928fdf9edec575e37 # Parent a5ea79f3221f94c2812ad0307d7f90eb8b16a306 order imports and add an add_options() API diff -r a5ea79f3221f -r ebc5cfe17d95 makeitso/python_module/{{module}}.py --- a/makeitso/python_module/{{module}}.py Sat Dec 01 19:15:48 2012 -0800 +++ b/makeitso/python_module/{{module}}.py Sat Dec 01 19:35:46 2012 -0800 @@ -5,8 +5,12 @@ {{description}} """ +import optparse import sys -import optparse + +def add_options(parser): + """add {{module}} options to an OptionParser instance""" + def main(args=sys.argv[1:]): @@ -20,6 +24,7 @@ else: return '' parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter()) + add_options(parser) options, args = parser.parse_args(args) if __name__ == '__main__':