mpas_analysis.configuration.MpasAnalysisConfigParser¶
- 
class 
mpas_analysis.configuration.MpasAnalysisConfigParser(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]¶ - 
__init__(self, 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 at 0x7faebd38b500>, converters=<object object at 0x7faebd38b500>)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(self[, defaults, dict_type, …])Initialize self.
add_section(self, section)Create a new section in the configuration.
clear(self)defaults(self)get(self, section, option, \*[, raw, vars, …])Get an option value for a given section.
getExpression(self, section, option[, …])Get an option as an expression (typically a list, though tuples and dicts are also availabe).
getWithDefault(self, section, option, default)Get an option, using the supplied default value if the option is not present.
getboolean(self, section, option, \*[, raw, …])getfloat(self, section, option, \*[, raw, …])getint(self, section, option, \*[, raw, …])has_option(self, section, option)Check for the existence of a given option in a given section.
has_section(self, section)Indicate whether the named section is present in the configuration.
items(self[, section, raw, vars])Return a list of (name, value) tuples for each option in a section.
keys(self)options(self, section)Return a list of option names for the given section name.
optionxform(self, optionstr)pop(self, key[, default])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem(self)Remove a section from the parser and return it as a (section_name, section_proxy) tuple.
read(self, filenames[, encoding])Read and parse a filename or an iterable of filenames.
read_dict(self, dictionary[, source])Read configuration from a dictionary.
read_file(self, f[, source])Like read() but the argument must be a file-like object.
read_string(self, string[, source])Read configuration from a given string.
readfp(self, fp[, filename])Deprecated, use read_file instead.
remove_option(self, section, option)Remove an option.
remove_section(self, section)Remove a file section.
sections(self)Return a list of section names, excluding [DEFAULT]
set(self, section, option[, value])Set an option.
setdefault(self, key[, default])update(\*args, \*\*kwds)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values(self)write(self, fp[, space_around_delimiters])Write an .ini-format representation of the configuration state.
Attributes
BOOLEAN_STATESNONSPACECREOPTCREOPTCRE_NVSECTCREconverters-