Package circuits :: Package lib :: Module config :: Class Config

Class Config

              object --+            
                       |            
            core.Manager --+        
                           |        
          core.BaseComponent --+    
                               |    
                  core.Component --+
                                   |
ConfigParser.RawConfigParser --+   |
                               |   |
       ConfigParser.ConfigParser --+
                                   |
                                  Config

Nested Classes

Inherited from core.Component: __metaclass__

Instance Methods
 
__init__(self, filename, defaults=None)
initializes x; see x.__class__.__doc__ for signature
 
get(self, section, option, default=None, raw=False, vars=None)
Get an option value for a given section.
 
getint(self, section, option, default=0)
 
getfloat(self, section, option, default=0.0)
 
getboolean(self, section, option, default=False)
 
onLOAD(C)
Load the configuration file.
 
onSAVE(C)
Save the configuration file.

Inherited from core.BaseComponent: __call__, __repr__, register, unregister

Inherited from core.Manager: __add__, __iadd__, __isub__, __len__, __sub__, flush, push, run, send, start, stop

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

Inherited from ConfigParser.ConfigParser: items

Inherited from ConfigParser.RawConfigParser: add_section, defaults, has_option, has_section, options, optionxform, read, readfp, remove_option, remove_section, sections, set, write

Static Methods

Inherited from core.Component: __new__

Class Variables
  channel = 'config'
The Component's Channel

Inherited from ConfigParser.RawConfigParser: OPTCRE, SECTCRE

Instance Variables

Inherited from core.Manager: manager

Properties

Inherited from core.Manager: channels, components, running, state, ticks

Inherited from object: __class__

Method Details

__init__(self, filename, defaults=None)
(Constructor)

 

initializes x; see x.__class__.__doc__ for signature

Overrides: ConfigParser.RawConfigParser.__init__

get(self, section, option, default=None, raw=False, vars=None)

 

Get an option value for a given section.

All % interpolations are expanded in the return values, based on the defaults passed into the constructor, unless the optional argument `raw' is true. Additional substitutions may be provided using the `vars' argument, which must be a dictionary whose contents overrides any pre-existing defaults.

The section DEFAULT is special.

Overrides: ConfigParser.RawConfigParser.get

getint(self, section, option, default=0)

 
Overrides: ConfigParser.RawConfigParser.getint

getfloat(self, section, option, default=0.0)

 
Overrides: ConfigParser.RawConfigParser.getfloat

getboolean(self, section, option, default=False)

 
Overrides: ConfigParser.RawConfigParser.getboolean

onLOAD(C)

 

Load the configuration file.

Decorators:
  • @handler("load")

onSAVE(C)

 

Save the configuration file.

Decorators:
  • @handler("save")