Mercurial > hg > MakeItSo
changeset 79:8c326f764cfe
add a CLI template
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 08 Jan 2011 20:46:10 -0800 |
parents | d4184945f8a8 |
children | 0300ed78d630 |
files | makeitso/python_package/script.py makeitso/python_package/{{package}}/main.py |
diffstat | 2 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/makeitso/python_package/script.py Sat Jan 08 17:54:58 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#!/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()
--- /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()