You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2020. It is now read-only.
This is Issue 10 moved from a Google Code project.
Added by 2009-05-22T16:54:20.000Z by Sridhar....@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-High, Usability
Original description
To add global options, one can write code like this:
def get_optparser(self):
p = cmdln.Cmdln.get_optparser(self)
p.add_option('-E', '--environment', dest='env',
help='path to virtualenv environment to use')
p.set_defaults(env=None)
return p
Wouldn't it be better to do this by using the same `@cmdln.option`
decorator but on the class itself rather than a method?
@cmdln.option('-E', '--environment', ...)
class Foo(cmdln.Cmdln):
...
Thoughts?
(this would affect issue 2)