Mercurial > hg > MakeItSo
comparison makeitso/python_package/{{package}}/main.py @ 159:cfd4f1e91090
wip
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 30 Jul 2013 15:20:38 -0700 |
parents | 386a44a52139 |
children |
comparison
equal
deleted
inserted
replaced
158:ff1f41a18da9 | 159:cfd4f1e91090 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # -*- coding: utf-8 -*- | |
2 | 3 |
3 """ | 4 """ |
4 {{description}} | 5 {{description}} |
5 """ | 6 """ |
6 | 7 |
8 import optparse | |
9 import os | |
10 import subprocess | |
7 import sys | 11 import sys |
8 import optparse | 12 |
13 def add_options(parser): | |
14 """add {{package}} options to an OptionParser instance""" | |
9 | 15 |
10 def main(args=sys.argv[1:]): | 16 def main(args=sys.argv[1:]): |
11 | 17 |
12 # parse command line options | 18 # parse command line options |
13 usage = '%prog [options]' | 19 usage = '%prog [options] ...' |
14 class PlainDescriptionFormatter(optparse.IndentedHelpFormatter): | 20 class PlainDescriptionFormatter(optparse.IndentedHelpFormatter): |
15 """description formatter for console script entry point""" | 21 """description formatter for console script entry point""" |
16 def format_description(self, description): | 22 def format_description(self, description): |
17 if description: | 23 if description: |
18 return description.strip() + '\n' | 24 return description.strip() + '\n' |