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__(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>)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([defaults, dict_type, …])Initialize self. add_section(section)Create a new section in the configuration. clear()defaults()get(section, option, *[, raw, vars, fallback])Get an option value for a given section. getExpression(section, option[, …])Get an option as an expression (typically a list, though tuples and dicts are also availabe). getWithDefault(section, option, default)Get an option, using the supplied default value if the option is not present. getboolean(section, option, *[, raw, vars, …])getfloat(section, option, *[, raw, vars, …])getint(section, option, *[, raw, vars, fallback])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 (name, value) tuples for each option in a section. keys()options(section)Return a list of option names for the given section name. optionxform(optionstr)pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised. popitem()Remove a section from the parser and return it as a (section_name, section_proxy) tuple. read(filenames[, encoding])Read and parse a filename or a list of filenames. read_dict(dictionary[, source])Read configuration from a dictionary. read_file(f[, source])Like read() but the argument must be a file-like object. read_string(string[, source])Read configuration from a given string. readfp(fp[, filename])Deprecated, use read_file instead. 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. setdefault(k[,d])update([E, ]**F)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()write(fp[, space_around_delimiters])Write an .ini-format representation of the configuration state. Attributes
BOOLEAN_STATESNONSPACECREOPTCREOPTCRE_NVSECTCREconverters-