0094400945 def __setitem__(self, key, value):
00946 # To conform with the mapping protocol, overwrites existing values in00947 # the section.00948
00949 # XXX this is not atomic if read_dict fails at any point. Then again,00950 # no update method in configparser is atomic in this implementation.00951 self.remove_section(key)
00952 self.read_dict({key: value})

0116201163 def add_section(self, section):
01164 """Create a new section in the configuration. Extends01165 RawConfigParser.add_section by validating if the section name is01166 a string."""01167 self._validate_value_types(section=section)
01168 super().add_section(section)
01169

Get an option value for a given section.
If `vars' is provided, it must be a dictionary. The option is looked up
in `vars' (if provided), `section', and in `DEFAULTSECT' in that order.
If the key is not found and `fallback' is provided, it is used as
a fallback value. `None' can be provided as a `fallback' value.
If interpolation is enabled and the optional argument `raw' is False,
all interpolations are expanded in the return values.
Arguments `raw', `vars', and `fallback' are keyword only.
The section DEFAULT is special.

0065500656 def has_section(self, section):
00657 """Indicate whether the named section is present in the configuration.00658 00659 The DEFAULT section is not acknowledged.00660 """00661 return section in self._sections

Return a list of (name, value) tuples for each option in a section.
All % interpolations are expanded in the return values, based on the
defaults passed into the constructor, unless the optional argument
`raw' is true. Additional substitutions may be provided using the
`vars' argument, which must be a dictionary whose contents overrides
any pre-existing defaults.
The section DEFAULT is special.

Read and parse a filename or a list of filenames.
Files that cannot be opened are silently ignored; this is
designed so that you can specify a list of potential
configuration file locations (e.g. current directory, user's
home directory, systemwide directory), and all existing
configuration files in the list will be read. A single
filename may also be given.
Return list of successfully read files.

Read configuration from a dictionary.
Keys are section names, values are dictionaries with keys and values
that should be present in the section. If the used dictionary type
preserves order, sections and their keys will be added in order.
All types held in the dictionary are converted to strings during
reading, including section names, option names and keys.
Optional second argument is the `source' specifying the name of the
dictionary being read.

Like read() but the argument must be a file-like object.
The `f' argument must be iterable, returning one line at a time.
Optional second argument is the `source' specifying the name of the
file being read. If not given, it is taken from f.name. If `f' has no
`name' attribute, `<???>' is used.

0069500696 def read_file(self, f, source=None):
00697 """Like read() but the argument must be a file-like object.00698 00699 The `f' argument must be iterable, returning one line at a time.00700 Optional second argument is the `source' specifying the name of the00701 file being read. If not given, it is taken from f.name. If `f' has no00702 `name' attribute, `<???>' is used.00703 """00704 if source isNone:
00705 try:
00706 source = f.name
00707 except AttributeError:
00708 source = '<???>'00709 self._read(f, source)