Arguments manager class used to handle command-line arguments and options.
Method | __init__ |
Undocumented |
Method | add |
DEPRECATED. |
Method | add |
DEPRECATED. |
Method | cb |
DEPRECATED: Optik callback for option setting. |
Method | config |
Undocumented |
Method | generate |
DEPRECATED: Write a configuration file according to the current configuration into the given stream or stdout. |
Method | global |
DEPRECATED: Set option on the correct option provider. |
Method | help |
Return the usage string based on the available options. |
Method | load |
DEPRECATED: Override configuration according to command line parameters. |
Method | load |
DEPRECATED: Dispatch values previously read from a configuration file to each option's provider. |
Method | load |
DEPRECATED: Override configuration according to given parameters. |
Method | load |
Undocumented |
Method | load |
DEPRECATED: Initialize configuration using default values. |
Method | optik |
DEPRECATED: Get our personal option definition and return a suitable form for use with optik/optparse. |
Method | options |
Undocumented |
Method | read |
DEPRECATED: Read the configuration file but do not load it (i.e. dispatching values to each option's provider). |
Method | register |
DEPRECATED: Register an options provider. |
Method | reset |
DEPRECATED. |
Method | set |
Set an option on the namespace object. |
Instance Variable | cfgfile |
Undocumented |
Instance Variable | cmdline |
Undocumented |
Instance Variable | config |
Namespace for all options. |
Property | options |
Undocumented |
Static Method | _add |
Add an argument. |
Static Method | _parse |
DEPRECATED: Parse and handle errors of a toml configuration file. |
Method | _add |
Add an argument to the correct argument section/group. |
Method | _generate |
Write a configuration file according to the current configuration into stdout. |
Method | _load |
Loads the default values of all registered options. |
Method | _parse |
Parse the arguments found on the command line into the namespace. |
Method | _parse |
Parse the arguments found in a configuration file into the namespace. |
Method | _register |
Register an options provider and load its defaults. |
Instance Variable | _all |
Undocumented |
Instance Variable | _arg |
The command line argument parser. |
Instance Variable | _argument |
Dictionary of all the argument groups. |
Instance Variable | _base |
Fall back Namespace object created during initialization. |
Instance Variable | _config |
Namespace for all options. |
Instance Variable | _directory |
Mapping of directories and their respective namespace objects. |
Instance Variable | _maxlevel |
Undocumented |
Instance Variable | _mygroups |
Undocumented |
Instance Variable | _nocallback |
Undocumented |
Instance Variable | _optik |
Undocumented |
Instance Variable | _option |
All option dictionaries that have been registered. |
Instance Variable | _options |
Undocumented |
Instance Variable | _short |
Undocumented |
ConfigProvider
, optikcontainer: optparse.OptionParser|optparse.OptionGroup
, opt: str
, optdict: OptionDict
):
(source)
¶
DEPRECATED.
str
, _: str|None
, options: list[ tuple[ str, OptionDict]]
, provider: ConfigProvider
):
(source)
¶
DEPRECATED.
TextIO|None
= None, skipsections: tuple[ str, ...]
= ()):
(source)
¶
DEPRECATED: Write a configuration file according to the current configuration into the given stream or stdout.
DEPRECATED: Override configuration according to command line parameters. return additional arguments
ConfigProvider
, opt: str
, optdict: OptionDict
) -> tuple[ list[ str], OptionDict]
:
(source)
¶
DEPRECATED: Get our personal option definition and return a suitable form for use with optik/optparse.
DEPRECATED: Read the configuration file but do not load it (i.e. dispatching values to each option's provider). :raises OSError: When the specified config file doesn't exist
str
, value: Any
, action: str|None
= 'default_value', optdict: (None|str)|OptionDict
= 'default_value'):
(source)
¶
Set an option on the namespace object.
def _add_parser_option(section_group:
argparse._ArgumentGroup
, argument: _Argument
):
(source)
¶
Add an argument.
DEPRECATED: Parse and handle errors of a toml configuration file. TODO: 3.0: Remove deprecated method.
str
, section_desc: str|None
, argument: _Argument
):
(source)
¶
Add an argument to the correct argument section/group.
Sequence[ str]|None
= None) -> list[ str]
:
(source)
¶
Parse the arguments found on the command line into the namespace.
Fall back Namespace object created during initialization. This is necessary for the per-directory configuration support. Whenever we fail to match a file with a directory we fall back to the Namespace object created during initialization.