[Twisted-Python] usage.Options
Moshe Zadka
twisted at moshez.org
Fri Oct 4 06:24:28 MDT 2002
On Fri, 04 Oct 2002, Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
> Some convenience mechanism might, but this one's broken. If you want to come
> up with one, remember that:
>
> * order matters (opt_ methods may require being run in order)
> * you can pass sub-commands
> * there are boolean options as well as keyword args
> * it would probably be nice to be able to use single-letter options too
The only convenience mechanism I can imagine which would actually satisfy
all your criteria is a function which takes *args:
.updateOptionsArgs("--foo", "bar", "-r", "baz")
....
which is just a tiny bit better than to have to wrap it with [] as
warner was doing.
More information about the Twisted-Python
mailing list