comparison README.txt @ 19:1899088dd95d

more readme correction, now in function def
author catherine@localhost
date Thu, 15 May 2008 13:44:48 -0400
parents b7489d3f838e
children a791d615545c
comparison
equal deleted inserted replaced
18:b7489d3f838e 19:1899088dd95d
46 - Parsing commands with `optparse` options (flags) 46 - Parsing commands with `optparse` options (flags)
47 47
48 :: 48 ::
49 49
50 @options([make_option('-m', '--myoption', action="store_true", help="all about my option")]) 50 @options([make_option('-m', '--myoption', action="store_true", help="all about my option")])
51 def myfunc(self, arg, opts): 51 def do_myfunc(self, arg, opts):
52 if opts.myoption: 52 if opts.myoption:
53 ... 53 ...
54 54
55 See Python standard library's `optparse` documentation: http://docs.python.org/lib/optparse-defining-options.html 55 See Python standard library's `optparse` documentation: http://docs.python.org/lib/optparse-defining-options.html
56 56