comparison example/persona.py @ 24:bdb005ae848b

example/persona.py
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 26 Dec 2013 20:06:49 -0800
parents 21124b238feb
children e5efb021a8e6
comparison
equal deleted inserted replaced
23:21124b238feb 24:bdb005ae848b
15 15
16 def main(args=sys.argv[1:]): 16 def main(args=sys.argv[1:]):
17 17
18 usage = '%prog [options]' 18 usage = '%prog [options]'
19 parser = optparse.OptionParser(usage=usage, description=__doc__) 19 parser = optparse.OptionParser(usage=usage, description=__doc__)
20 parser 20 parser.add_option('-p', '--port', dest='port',
21 type='int', default=8123,
22 help="port to serve on")
21 options, args = parser.parse_args(args) 23 options, args = parser.parse_args(args)
24
25
22 26
23 if __name__ == '__main__': 27 if __name__ == '__main__':
24 main() 28 main()