Mercurial > python-cmd2
diff README.txt @ 18:b7489d3f838e
more readme correction, now in function def
author | catherine@localhost |
---|---|
date | Thu, 15 May 2008 13:43:54 -0400 |
parents | f81b5670a713 |
children | 1899088dd95d |
line wrap: on
line diff
--- 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`