__init__(self,
name,
shortOption=None,
longOption=None,
acceptsArgument=False,
default=None,
argumentName=None,
help='',
category='general',
action=None,
argument=None)
(Constructor)
-
- Parameters:
name -
The key name that will be avaliable in the self.OPTION
dictionary when the application is executing.
shortOption -
Single letter to be assignd to this option.
longOption -
The long option name that is prepended with -- on the command
line.
acceptsArgument -
True if the option requires a value to be assigned from the
command line.
default -
Default value if the option is not passed in via the command
line.
argumentName -
Same as argument, overridden by argument.
help -
Description of the option as displayed in help text.
category -
Used to create groups of command options, where groups
"base", "dev", "connections" and
"general" are predefined. There is an option
--help-dev, --help-connections to give a special help-text for
these groups of options.
action -
Function-pointer; if supplied this function will be called
automatically if the option is given on command line.
argument -
Option argument as shown in help text. Same as
argumentName.
|