Each configuration is stored in a text file. The configuration is
structured in sections. Each section stores a set of options.
Example:
|
|
__init__(self,
config_file=None,
default_config="")
Load a config stored in the given file for the given application. |
source code
|
|
|
string
|
|
|
string
|
|
|
|
|
|
object
|
get_option(self,
key,
section='general',
default=None)
Fetch the option value stored in the given section, at the given key. |
source code
|
|
|
|
set_option(self,
key,
value,
section='general')
Store an option value under key id at the given section. |
source code
|
|
|
|
del_option(self,
key,
section='general')
Remove the option identified by key under the specified section. |
source code
|
|
|
|
write(self,
filename=None)
save the config in a text file (handled by ConfigObj) |
source code
|
|
|
|
|
elisa.extern.configobj.ConfigObj or empty
dict
|
|
|
|
set_section(self,
section_name,
section={},
doc={})
Store section_data in a new section identified by section_name in the
config |
source code
|
|
|
|
|
|
|
delete_file(self)
Delete the configuration file on disk. |
source code
|
|
|
dict
|
|
|
Inherited from extern.log.log.Loggable:
debug,
doLog,
error,
info,
log,
logFunction,
logObjectName,
warning,
warningFailure
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|