API Reference¶
Extend ConfigParser
to add some inheritance functionality.
-
exception
zconfigparser.
DuplicateZKeyError
(new, old)[source]¶ Raised when duplicate zkeys are found.
-
exception
zconfigparser.
RecursiveZkeyError
(key)[source]¶ Raised when circular zkey structure is found.
cf. ‘[aa : bb]’, ‘[bb : cc]’, ‘[cc : aa]’
-
exception
zconfigparser.
NoZOptionError
(option, section)[source]¶ Raised when no option in a zsection is found.
-
class
zconfigparser.
ZDict
(*args, **kwargs)[source]¶ A custom dictionary used in ZConfigParser.
It creates and keeps internal zsection dependency dictionaries. (They are ordinary
dict
). Without this, ZConfigParser has to search all sections all the time and is very slow.
-
class
zconfigparser.
ZDictGen
(*args, **kwargs)[source]¶ A supplement class needed to create ZSEP pre-initialized ZDict.
To adjust for ConfigParser intialization argument dict_type.
-
class
zconfigparser.
ZConfigParser
(*args, **kwargs)[source]¶ ConfigParser, plus some section inheritance function.
E.g. section
[aa : bb]
becomes[aa]
, and inherits and overrides section [bb]. Default separator word is ‘ : ‘, exactly one space before and after ‘:’.