All callbacks are called as follows:
func(option, opt_str, value, parser, *args, **kwargs)
where
optionopt_stropt_str will
be the full, canonical option string--e.g. if the user puts
"-foo" on the command-line as an abbreviation for
"-foobar", then opt_str will be "-foobar".)
valuevalue
will be the type implied by the option's type. If type for this
option is None (no argument expected), then value will be
None. If nargs > 1, value will be a tuple of values of
the appropriate type.
parserparser.largsparser.largs, e.g. by adding more
arguments to it. (This list will become args, the second
return value of parse_args().)
parser.rargsopt_str and
value (if applicable) removed, and only the arguments
following them still there. Feel free to modify
parser.rargs, e.g. by consuming more arguments.
parser.valuesargscallback_args option attribute.
kwargscallback_kwargs.
See About this document... for information on suggesting changes.