ConfigParser.SafeConfigParser

class ConfigParser.SafeConfigParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False)[source]

Methods

__init__([defaults, dict_type, allow_no_value])
_get(section, conv, option)
_interpolate(section, option, rawval, vars)
_interpolate_some(option, accum, rest, ...)
_interpolation_replace(match)
_read(fp, fpname) Parse a sectioned setup file.
add_section(section) Create a new section in the configuration.
defaults()
get(section, option[, raw, vars]) Get an option value for a given section.
getboolean(section, option)
getfloat(section, option)
getint(section, option)
has_option(section, option) Check for the existence of a given option in a given section.
has_section(section) Indicate whether the named section is present in the configuration.
items(section[, raw, vars]) Return a list of tuples with (name, value) for each option in the section.
options(section) Return a list of option names for the given section name.
optionxform(optionstr)
read(filenames) Read and parse a filename or a list of filenames.
readfp(fp[, filename]) Like read() but the argument must be a file-like object.
remove_option(section, option) Remove an option.
remove_section(section) Remove a file section.
sections() Return a list of section names, excluding [DEFAULT]
set(section, option[, value]) Set an option.
write(fp) Write an .ini-format representation of the configuration state.