Bit improved ConfigParser.
Additional features:
|
|
__init__(self,
main_section,
filename,
sane_config=1)
Initialize Config and read from file. |
source code
|
|
|
|
|
|
|
get(self,
key,
default=None)
Reads string value, if not set then default. |
source code
|
|
|
|
getint(self,
key,
default=None)
Reads int value, if not set then default. |
source code
|
|
|
|
getboolean(self,
key,
default=None)
Reads boolean value, if not set then default. |
source code
|
|
|
|
getfloat(self,
key,
default=None)
Reads float value, if not set then default. |
source code
|
|
|
|
getlist(self,
key,
default=None)
Reads comma-separated list from key. |
source code
|
|
|
|
|
|
|
get_wildcard(self,
key,
values=[],
default=None)
Reads a wildcard property from conf and returns its string value,
if not set then default. |
source code
|
|
|
|
sections(self)
Returns list of sections in config file, excluding DEFAULT. |
source code
|
|
|
|
clone(self,
main_section)
Return new Config() instance with new main section on same config
file. |
source code
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|