configparser.RawConfigParser.add_section()

add_section(section) Add a section named section to the instance. If a section by the given name already exists, DuplicateSectionError is raised. If the default section name is passed, ValueError is raised. Type of section is not checked which lets users create non-string named sections. This behaviour is unsupported and may cause internal errors.

configparser.RawConfigParser

class configparser.RawConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT[, interpolation]) Legacy variant of the ConfigParser with interpolation disabled by default and unsafe add_section and set methods. Note Consider using ConfigParser instead which checks types of the values to be stored in

configparser.ParsingError

exception configparser.ParsingError Exception raised when errors occur attempting to parse a file. Changed in version 3.2: The filename attribute and __init__() argument were renamed to source for consistency.

configparser.optionxform()

configparser.optionxform(option) This method transforms option names on every read, get, or set operation. The default converts the name to lowercase. This also means that when a configuration file gets written, all keys will be lowercase. Override this method if that’s unsuitable. For example: >>> config = """ ... [Section1] ... Key = Value ... ... [Section2] ... AnotherKey = Value ... """ >>> typical = configparser.ConfigParser() >>> typical.read_string(config) &

configparser.NoSectionError

exception configparser.NoSectionError Exception raised when a specified section is not found.

configparser.NoOptionError

exception configparser.NoOptionError Exception raised when a specified option is not found in the specified section.

configparser.MissingSectionHeaderError

exception configparser.MissingSectionHeaderError Exception raised when attempting to parse a file which has no section headers.

configparser.InterpolationSyntaxError

exception configparser.InterpolationSyntaxError Exception raised when the source text into which substitutions are made does not conform to the required syntax. Subclass of InterpolationError.

configparser.InterpolationMissingOptionError

exception configparser.InterpolationMissingOptionError Exception raised when an option referenced from a value does not exist. Subclass of InterpolationError.

configparser.InterpolationError

exception configparser.InterpolationError Base class for exceptions raised when problems occur performing string interpolation.