Package logilab :: Package common :: Module configuration :: Class OptionsManagerMixIn

[frames] | no frames]

# Class OptionsManagerMixIn

source code

    object --+
             |
            OptionsManagerMixIn

    MixIn to handle a configuration from both a configuration file and
    command line options

Instance Methods

__init__(self, usage, config_file=None, version=None, quiet=0) x.__init__(...) initializes x; see help(type(x)) for signature | source code

reset_parsers(self, usage='', version=None) | source code

register_options_provider(self, provider, own_group=True) register an options provider | source code

add_option_group(self, group_name, doc, options, provider) add an option group including the listed options... | source code

add_optik_option(self, provider, optikcontainer, opt, optdict) | source code

optik_option(self, provider, opt, optdict) get our personal option definition and return a suitable form for... | source code

cb_set_provider_option(self, option, opt, value, parser) optik callback for option setting | source code

global_set_option(self, opt, value) set option on the correct option provider | source code

generate_config(self, stream=None, skipsections=(), encoding=None) write a configuration file according to the current configuration... | source code

generate_manpage(self, pkginfo, section=1, stream=None) write a man page for the current configuration into the given... | source code

load_provider_defaults(self) initialize configuration using default values | source code

load_file_configuration(self, config_file=None) load the configuration from file | source code

read_config_file(self, config_file=None) read the configuration file but do not load it (i.e. | source code

input_config(self, onlysection=None, inputlevel=0, stream=None) interactively get configuration values by asking to the user and generate... | source code

load_config_file(self) dispatch values previously read from a configuration file to each... | source code

load_configuration(self, **kwargs) override configuration according to given parameters... | source code

load_command_line_configuration(self, args=None) override configuration according to command line parameters | source code

add_help_section(self, title, description, level=0) add a dummy option section for help purpose | source code

help(self, level=0) return the usage string for available options | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, usage, config_file=None, version=None, quiet=0)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### add_option_group(self, group_name, doc, options, provider)

source code

    add an option group including the listed options

### optik_option(self, provider, opt, optdict)

source code

    get our personal option definition and return a suitable form for
    use with optik/optparse

### generate_config(self, stream=None, skipsections=(), encoding=None)

source code

    write a configuration file according to the current configuration
    into the given stream or stdout

### generate_manpage(self, pkginfo, section=1, stream=None)

source code

    write a man page for the current configuration into the given
    stream or stdout

### read_config_file(self, config_file=None)

source code

    read the configuration file but do not load it (i.e. dispatching
    values to each options provider)

### input_config(self, onlysection=None, inputlevel=0, stream=None)

source code

    interactively get configuration values by asking to the user and generate
    a configuration file

### load_config_file(self)

source code

    dispatch values previously read from a configuration file to each
    options provider)

### load_configuration(self, **kwargs)

source code

    override configuration according to given parameters

### load_command_line_configuration(self, args=None)

source code

    override configuration according to command line parameters

    return additional arguments