pyExtendedConfigParser

Extended Classes

ExtendedSectionProxy

class pyExtendedConfigParser.ExtendedSectionProxy(parser, name)[source]

Bases: configparser.SectionProxy

ExtendedInterpolation

class pyExtendedConfigParser.ExtendedInterpolation[source]

Bases: configparser.Interpolation

ExtendedConfigParser

class pyExtendedConfigParser.ExtendedConfigParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object>, converters=<object object>)[source]

Bases: configparser.ConfigParser

Extended *.ini configuration file reader/writer based on Python’s ConfigParser.

clear() → None. Remove all items from D.[source]
_unify_values(section, variables)[source]

Create a sequence of lookups with ‘variables’ taking priority over the ‘section’ which takes priority over the DEFAULTSECT.

has_option(section, option)[source]

Check for the existence of a given option in a given section. If the specified section is None or an empty string, DEFAULT is assumed. If the specified section does not exist, returns False.

Workarounds for Python 3.4

Note

Required for ReadTheDocs, which doesn’t support Python 3.5 yet.

ConverterMapping

class pyExtendedConfigParser.ConverterMapping(parser)[source]

Bases: collections.abc.MutableMapping

Enables reuse of get*() methods between the parser and section proxies.

If a parser class implements a getter directly, the value for the given key will be None. The presence of the converter name here enables section proxies to find and use the implementation on the parser class.

See also

Python’s :class:~configparser.ConfigParser from module configparser

Module to read and write *.ini configuration files.