Staging: this is not the live site, pydocs.org.
Command-line interface libraries
Instance attributes:
_short_opts : [string]
_long_opts : [string]
action : string
type : string
dest : string
default : any
nargs : int
const : any
choices : [string]
callback : function
callback_args : (any*)
callback_kwargs : { string : any }
help : string
metavar : stringMembers of Option
a
- ACTIONS
- All actions must be listed in ACTIONS.
c
- callback
- For options with action "callback", the callable to call when this option is seen.
- callback_args
- Additional positional and keyword arguments to pass to callback after the four standard callback arguments.
- callback_kwargs
- Additional positional and keyword arguments to pass to callback after the four standard callback arguments.
- choices
- For options of type "choice", the list of strings the user may choose from.
- const
- For actions that store a constant value, the constant value to store.
d
- default
- The value to use for this option’s destination if the option is not seen on the command line.
- dest
- (default: derived from option strings)
h
- help
- Help text to print for this option when listing all available options after the user supplies a help option (such as --help).
m
- metavar
- (default: derived from option strings)
t
- TYPE_CHECKER
- A dictionary mapping type names to type-checking functions.
- TYPES
- A tuple of type names; in your subclass, simply define a new tuple TYPES that builds on the standard one.