Classes | |
| class | Builder |
| class | ConfigObj |
| An object to read, create, and write config files. More... | |
| class | ConfigObjError |
| This is the base class for all errors that ConfigObj raises. More... | |
| class | ConfigParserInterpolation |
| Behaves like ConfigParser. More... | |
| class | ConfigspecError |
| Base class for the two interpolation errors. More... | |
| class | DuplicateError |
| The keyword or section specified already exists. More... | |
| class | InterpolationEngine |
| class | InterpolationError |
| Maximum interpolation depth exceeded in string interpolation. More... | |
| class | InterpolationLoopError |
| class | MissingInterpolationOption |
| class | NestingError |
| This error indicates a level of nesting that doesn't match. More... | |
| class | ParseError |
| A 'reload' operation failed. More... | |
| class | ReloadError |
| class | RepeatSectionError |
This error indicates additional sections in a section with a __many__ (repeated) section. More... | |
| class | Section |
| A dictionary-like object that represents a section in a config file. More... | |
| class | SimpleVal |
| A simple validator. More... | |
| class | TemplateInterpolation |
| Behaves like string.Template. More... | |
| class | UnknownType |
| class | UnreprError |
| An error parsing in unrepr mode. More... | |
Functions | |
| def | __newobj__ (cls, *args) |
| def | flatten_errors (cfg, res, levels=None, results=None) |
An example function that will turn a nested dictionary of results (as returned by ConfigObj.validate) into a flat list. More... | |
| def | get_extra_values (conf, _prepend=()) |
| Find all the values and sections not in the configspec from a validated ConfigObj. More... | |
| def | getObj (s) |
| def | match_utf8 (encoding) |
| def | unrepr (s) |
Variables | |
| tuple | __all__ |
| _builder | |
| dictionary | BOM_LIST |
| dictionary | BOM_SET |
| dictionary | BOMS |
| compiler = None | |
| string | DEFAULT_INDENT_TYPE = ' ' |
| string | DEFAULT_INTERPOLATION = 'configparser' |
| string | dquot = '"%s"' |
| dictionary | interpolation_engines |
| int | MAX_INTERPOL_DEPTH = 10 |
| MISSING = object() | |
| string | noquot = "%s" |
| dictionary | OPTION_DEFAULTS |
| string | squot = "'%s'" |
| string | tdquot = "'''%s'''" |
| string | tsquot = '"""%s"""' |
| string | wspace_plus = ' \r\n\v\t\'"' |
| def robotide.preferences.configobj.__newobj__ | ( | cls, | |
| * | args | ||
| ) |
Definition at line 479 of file configobj.py.
| def robotide.preferences.configobj.flatten_errors | ( | cfg, | |
| res, | |||
levels = None, |
|||
results = None |
|||
| ) |
An example function that will turn a nested dictionary of results (as returned by ConfigObj.validate) into a flat list.
cfg is the ConfigObj instance being checked, res is the results dictionary returned by validate.
(This is a recursive function, so you shouldn't use the levels or results arguments - they are used by the function.)
Returns a list of keys that failed. Each member of the list is a tuple::
([list of sections...], key, result)
If validate was called with preserve_errors=False (the default) then result will always be False.
list of sections is a flattened list of sections that the key was found in.
If the section was missing (or a section was expected and a scalar provided
None.If the value (or section) was missing then result will be False.
If validate was called with preserve_errors=True and a value was present, but failed the check, then result will be the exception object returned. You can use this as a string that describes the failure.
For example The value "3" is of the wrong type.
Definition at line 2524 of file configobj.py.
| def robotide.preferences.configobj.get_extra_values | ( | conf, | |
_prepend = () |
|||
| ) |
Find all the values and sections not in the configspec from a validated ConfigObj.
get_extra_values returns a list of tuples where each tuple represents either an extra section, or an extra value.
The tuples contain two values, a tuple representing the section the value is in and the name of the extra values. For extra values in the top level section the first member will be an empty tuple. For values in the 'foo' section the first member will be ('foo',). For members in the 'bar' subsection of the 'foo' section the first member will be ('foo', 'bar').
NOTE: If you call get_extra_values on a ConfigObj instance that hasn't been validated it will return an empty list.
Definition at line 2569 of file configobj.py.
| def robotide.preferences.configobj.getObj | ( | s | ) |
Definition at line 126 of file configobj.py.
| def robotide.preferences.configobj.match_utf8 | ( | encoding | ) |
Definition at line 66 of file configobj.py.
| def robotide.preferences.configobj.unrepr | ( | s | ) |
Definition at line 200 of file configobj.py.
|
private |
Definition at line 81 of file configobj.py.
|
private |
Definition at line 197 of file configobj.py.
| dictionary robotide.preferences.configobj.BOM_LIST |
Definition at line 38 of file configobj.py.
| dictionary robotide.preferences.configobj.BOM_SET |
Definition at line 57 of file configobj.py.
| dictionary robotide.preferences.configobj.BOMS |
Definition at line 29 of file configobj.py.
| robotide.preferences.configobj.compiler = None |
Definition at line 24 of file configobj.py.
| string robotide.preferences.configobj.DEFAULT_INDENT_TYPE = ' ' |
Definition at line 103 of file configobj.py.
| string robotide.preferences.configobj.DEFAULT_INTERPOLATION = 'configparser' |
Definition at line 102 of file configobj.py.
| string robotide.preferences.configobj.dquot = '"%s"' |
Definition at line 72 of file configobj.py.
| dictionary robotide.preferences.configobj.interpolation_engines |
Definition at line 473 of file configobj.py.
| int robotide.preferences.configobj.MAX_INTERPOL_DEPTH = 10 |
Definition at line 104 of file configobj.py.
| robotide.preferences.configobj.MISSING = object() |
Definition at line 79 of file configobj.py.
| string robotide.preferences.configobj.noquot = "%s" |
Definition at line 73 of file configobj.py.
| dictionary robotide.preferences.configobj.OPTION_DEFAULTS |
Definition at line 106 of file configobj.py.
| string robotide.preferences.configobj.squot = "'%s'" |
Definition at line 71 of file configobj.py.
| string robotide.preferences.configobj.tdquot = "'''%s'''" |
Definition at line 76 of file configobj.py.
| string robotide.preferences.configobj.tsquot = '"""%s"""' |
Definition at line 75 of file configobj.py.
| string robotide.preferences.configobj.wspace_plus = ' \r\n\v\t\'"' |
Definition at line 74 of file configobj.py.