| |
|
Back to Index
|
6.20.3.5 Querying and manipulating your option parser
Sometimes, it's useful to poke around your option parser and see what's there. OptionParser provides a couple of methods to help you out:
-
- Given an option string such as -q or --verbose,
returns true if the OptionParser has an option with that option
string.
-
- Returns the Option instance that implements the option string you
supplied, or
None if no options implement it.
-
- If the OptionParser has an option corresponding to opt_str,
that option is removed. If that option provided any other option strings, all of those
option strings become invalid.
If opt_str does not occur in any option belonging to this OptionParser,
raises ValueError.
|
|
|
|
|
|
© 2002-2004 Active-Venture.com
Webhosting
Service
|
| |
|
Disclaimer: This
documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/
|
|
|