Package logilab :: Package common :: Module configuration :: Class OptionsProviderMixIn

[frames] | no frames]

# Class OptionsProviderMixIn

source code

    object --+
             |
            OptionsProviderMixIn

    Mixin to provide options to an OptionsManager

Instance Methods

__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | source code

load_defaults(self) initialize the provider using default values | source code

option_default(self, opt, optdict=None) return the default value for an option | source code

option_attrname(self, opt, optdict=None) get the config attribute corresponding to opt... | source code

option_value(self, opt) get the current value for the given option | source code

set_option(self, opt, value, action=None, optdict=None) method called to set an option (registered in the options list)... | source code

input_option(self, option, optdict, inputlevel=99) | source code

get_option_def(self, opt) return the dictionary defining an option given it's name | source code

all_options(self) return an iterator on available options for this provider... | source code

options_by_section(self) return an iterator on options grouped by section | source code

options_and_values(self, options=None) | source code

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

Class Variables
| priority = `-1`
| name = `'default'`
| options = `()`
| level = `0`
| option_name = `deprecated('[0.60] OptionsProviderMixIn.option_n`...``

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self)
(Constructor)

source code

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

Overrides: object.__init__
  (inherited documentation)

### option_attrname(self, opt, optdict=None)

source code

    get the config attribute corresponding to opt

### set_option(self, opt, value, action=None, optdict=None)

source code

    method called to set an option (registered in the options list)

### all_options(self)

source code

    return an iterator on available options for this provider
    option are actually described by a 3-uple:
    (section, option name, option dictionary)

### options_by_section(self)

source code

    return an iterator on options grouped by section

    (section, [list of (optname, optdict, optvalue)])

Class Variable Details

### option_name

Value:

      deprecated('[0.60] OptionsProviderMixIn.option_name() was renamed to o
      ption_attrname()')(option_attrname)