Skip to content

Instantly share code, notes, and snippets.

@jondavidjohn
Created June 13, 2012 21:02
Show Gist options
  • Save jondavidjohn/2926493 to your computer and use it in GitHub Desktop.
Save jondavidjohn/2926493 to your computer and use it in GitHub Desktop.
Python shell utility start
import argparse
argparser = argparse.ArgumentParser(description="This is a Description of the Utility")
argparser.add_argument('--foo', '-f', help='help text for --foo argument', default="World")
def main():
"""Script Entry Point"""
print "Hello %s!" % args.foo
if __name__ == '__main__':
args = argparser.parse_args()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment