Package gavo :: Package utils :: Module fancyconfig :: Class Section
[frames] | no frames]

Class Section

source code

object --+
         |
        Section
Known Subclasses:

A section within the configuration.

It is constructed with a name, a documentation, and the configuration items.

They double as proxies between the configuration and their items via the setParent method.

Instance Methods
 
__init__(self, name, documentation, *items)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__iter__(self) source code
 
getitem(self, name) source code
 
get(self, name)
returns the value of the configuration item name.
source code
 
set(self, name, value, origin='user')
set the value of the configuration item name.
source code
 
setParent(self, parent) 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, name, documentation, *items)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

get(self, name)

source code 

returns the value of the configuration item name.

If it does not exist, a NoConfigItem exception will be raised.

set(self, name, value, origin='user')

source code 

set the value of the configuration item name.

value must always be a string, regardless of the item's actual type.