# HG changeset patch # User catherine@localhost # Date 1210873434 14400 # Node ID b7489d3f838e5f9b482096f031609e0792f02f61 # Parent f81b5670a7130ea5d006436967b862159da852d2 more readme correction, now in function def diff -r f81b5670a713 -r b7489d3f838e README.txt --- a/README.txt Thu May 15 13:41:54 2008 -0400 +++ b/README.txt Thu May 15 13:43:54 2008 -0400 @@ -48,12 +48,13 @@ :: @options([make_option('-m', '--myoption', action="store_true", help="all about my option")]) - def myfunc(self, arg): - ... + def myfunc(self, arg, opts): + if opts.myoption: + ... See Python standard library's `optparse` documentation: http://docs.python.org/lib/optparse-defining-options.html -- Catherine Devlin, catherinedevlin.blogspot.com +- Catherine Devlin, http://catherinedevlin.blogspot.com cmd2 can be installed with `easy_install cmd2`