<spanid="terminatorlib-configobj-configobj-module"></span><h2>terminatorlib.configobj.configobj module<aclass="headerlink"href="#module-terminatorlib.configobj.configobj"title="Permalink to this headline">¶</a></h2>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">ConfigObjError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObjError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObjError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObjError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObjError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">NestingError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#NestingError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.NestingError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">ParseError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ParseError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ParseError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">DuplicateError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#DuplicateError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.DuplicateError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">ConfigspecError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigspecError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigspecError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">InterpolationError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#InterpolationError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.InterpolationError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">InterpolationLoopError</code><spanclass="sig-paren">(</span><em>option</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#InterpolationLoopError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.InterpolationLoopError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>option</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#InterpolationLoopError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.InterpolationLoopError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">MissingInterpolationOption</code><spanclass="sig-paren">(</span><em>option</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#MissingInterpolationOption"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.MissingInterpolationOption"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>option</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#MissingInterpolationOption.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.MissingInterpolationOption.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">RepeatSectionError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#RepeatSectionError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.RepeatSectionError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">ReloadError</code><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ReloadError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ReloadError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ReloadError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ReloadError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">UnreprError</code><spanclass="sig-paren">(</span><em>message=''</em>, <em>line_number=None</em>, <em>line=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#UnreprError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.UnreprError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">UnknownType</code><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#UnknownType"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.UnknownType"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__repr__</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj.__repr__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj.__repr__"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_a_to_u</code><spanclass="sig-paren">(</span><em>aString</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._a_to_u"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._a_to_u"title="Permalink to this definition">¶</a></dt>
<dd><p>Decode ASCII strings to unicode if a self.encoding is specified.</p>
<codeclass="descname">_decode</code><spanclass="sig-paren">(</span><em>infile</em>, <em>encoding</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._decode"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._decode"title="Permalink to this definition">¶</a></dt>
<dd><p>Decode infile to unicode. Using the specified encoding.</p>
<p>if is a string, it also needs converting to a list.</p>
<codeclass="descname">_decode_element</code><spanclass="sig-paren">(</span><em>line</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._decode_element"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._decode_element"title="Permalink to this definition">¶</a></dt>
<dd><p>Decode element to unicode if necessary.</p>
<codeclass="descname">_get_single_quote</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._get_single_quote"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._get_single_quote"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_get_triple_quote</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._get_triple_quote"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._get_triple_quote"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_handle_bom</code><spanclass="sig-paren">(</span><em>infile</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._handle_bom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._handle_bom"title="Permalink to this definition">¶</a></dt>
<dd><p>Handle any BOM, and decode if necessary.</p>
<p>If an encoding is specified, that <em>must</em> be used - but the BOM should
still be removed (and the BOM attribute set).</p>
<p>(If the encoding is wrongly specified, then a BOM for an alternative
encoding won’t be discovered or removed.)</p>
<p>If an encoding is not specified, UTF8 or UTF16 BOM will be detected and
removed. The BOM attribute will be set. UTF16 will be decoded to
unicode.</p>
<p>NOTE: This method must not be called with an empty <codeclass="docutils literal"><spanclass="pre">infile</span></code>.</p>
<p>Specifying the <em>wrong</em> encoding is likely to cause a
<codeclass="descname">_handle_comment</code><spanclass="sig-paren">(</span><em>comment</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._handle_comment"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._handle_comment"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_handle_configspec</code><spanclass="sig-paren">(</span><em>configspec</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._handle_configspec"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._handle_configspec"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_handle_error</code><spanclass="sig-paren">(</span><em>text</em>, <em>ErrorClass</em>, <em>infile</em>, <em>cur_index</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._handle_error"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._handle_error"title="Permalink to this definition">¶</a></dt>
<dd><p>Handle an error according to the error settings.</p>
<p>Either raise the error or store it.
The error will have occured at <codeclass="docutils literal"><spanclass="pre">cur_index</span></code></p>
<codeclass="descname">_handle_value</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._handle_value"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._handle_value"title="Permalink to this definition">¶</a></dt>
<dd><p>Given a value string, unquote, remove comment,
handle lists. (including empty and single member lists)</p>
<codeclass="descname">_initialise</code><spanclass="sig-paren">(</span><em>options=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._initialise"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._initialise"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_load</code><spanclass="sig-paren">(</span><em>infile</em>, <em>configspec</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._load"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._load"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_match_depth</code><spanclass="sig-paren">(</span><em>sect</em>, <em>depth</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._match_depth"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._match_depth"title="Permalink to this definition">¶</a></dt>
<dd><p>Given a section and a depth level, walk back through the sections
parents to see if the depth level matches a previous section.</p>
<codeclass="descname">_multiline</code><spanclass="sig-paren">(</span><em>value</em>, <em>infile</em>, <em>cur_index</em>, <em>maxline</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._multiline"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._multiline"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the value, where we are in a multiline situation.</p>
<codeclass="descname">_parse</code><spanclass="sig-paren">(</span><em>infile</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._parse"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_quote</code><spanclass="sig-paren">(</span><em>value</em>, <em>multiline=True</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._quote"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._quote"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a safely quoted version of a value.</p>
<p>Raise a ConfigObjError if the value cannot be safely quoted.
If multiline is <codeclass="docutils literal"><spanclass="pre">True</span></code> (default) then use triple quotes
if necessary.</p>
<ulclass="simple">
<li>Don’t quote values that don’t need it.</li>
<li>Recursively quote members of a list and return a comma joined list.</li>
<li>Multiline is <codeclass="docutils literal"><spanclass="pre">False</span></code> for lists.</li>
<li>Obey list syntax for empty and single member lists.</li>
</ul>
<p>If <codeclass="docutils literal"><spanclass="pre">list_values=False</span></code> then the value is only quoted if it contains
a <codeclass="docutils literal"><spanclass="pre">\n</span></code> (is multiline) or ‘#’.</p>
<p>If <codeclass="docutils literal"><spanclass="pre">write_empty_values</span></code> is set, and the value is an empty string, it
<codeclass="descname">_set_configspec</code><spanclass="sig-paren">(</span><em>section</em>, <em>copy</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._set_configspec"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._set_configspec"title="Permalink to this definition">¶</a></dt>
<dd><p>Called by validate. Handles setting the configspec on subsections
including sections to be validated by __many__</p>
<codeclass="descname">_str</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._str"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._str"title="Permalink to this definition">¶</a></dt>
<dd><p>Used by <codeclass="docutils literal"><spanclass="pre">stringify</span></code> within validate, to turn non-string values
<codeclass="descname">_unquote</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._unquote"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._unquote"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_write_line</code><spanclass="sig-paren">(</span><em>indent_string</em>, <em>entry</em>, <em>this_entry</em>, <em>comment</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._write_line"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._write_line"title="Permalink to this definition">¶</a></dt>
<dd><p>Write an individual line, for the write method</p>
<codeclass="descname">_write_marker</code><spanclass="sig-paren">(</span><em>indent_string</em>, <em>depth</em>, <em>entry</em>, <em>comment</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj._write_marker"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._write_marker"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">reload</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj.reload"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj.reload"title="Permalink to this definition">¶</a></dt>
<dd><p>Reload a ConfigObj from file.</p>
<p>This method raises a <codeclass="docutils literal"><spanclass="pre">ReloadError</span></code> if the ConfigObj doesn’t have
<codeclass="descname">reset</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj.reset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj.reset"title="Permalink to this definition">¶</a></dt>
<dd><p>Clear ConfigObj instance and restore to ‘freshly created’ state.</p>
<codeclass="descname">validate</code><spanclass="sig-paren">(</span><em>validator</em>, <em>preserve_errors=False</em>, <em>copy=False</em>, <em>section=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj.validate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj.validate"title="Permalink to this definition">¶</a></dt>
<dd><p>Test the ConfigObj against a configspec.</p>
<p>It uses the <codeclass="docutils literal"><spanclass="pre">validator</span></code> object from <em>validate.py</em>.</p>
<p>To run <codeclass="docutils literal"><spanclass="pre">validate</span></code> on the current ConfigObj, call:</p>
<p>(Normally having previously passed in the configspec when the ConfigObj
was created - you can dynamically assign a dictionary of checks to the
<codeclass="docutils literal"><spanclass="pre">configspec</span></code> attribute of a section though).</p>
<p>It returns <codeclass="docutils literal"><spanclass="pre">True</span></code> if everything passes, or a dictionary of
pass/fails (True/False). If every member of a subsection passes, it
will just have the value <codeclass="docutils literal"><spanclass="pre">True</span></code>. (It also returns <codeclass="docutils literal"><spanclass="pre">False</span></code> if all
members fail).</p>
<p>In addition, it converts the values from strings to their native
types if their checks pass (and <codeclass="docutils literal"><spanclass="pre">stringify</span></code> is set).</p>
<p>If <codeclass="docutils literal"><spanclass="pre">preserve_errors</span></code> is <codeclass="docutils literal"><spanclass="pre">True</span></code> (<codeclass="docutils literal"><spanclass="pre">False</span></code> is default) then instead
of a marking a fail with a <codeclass="docutils literal"><spanclass="pre">False</span></code>, it will preserve the actual
exception object. This can contain info about the reason for failure.
For example the <codeclass="docutils literal"><spanclass="pre">VdtValueTooSmallError</span></code> indicates that the value
supplied was too small. If a value (or section) is missing it will
still be marked as <codeclass="docutils literal"><spanclass="pre">False</span></code>.</p>
<p>You must have the validate module to use <codeclass="docutils literal"><spanclass="pre">preserve_errors=True</span></code>.</p>
<p>You can then use the <codeclass="docutils literal"><spanclass="pre">flatten_errors</span></code> function to turn your nested
results dictionary into a flattened list of failures - useful for
<codeclass="descname">write</code><spanclass="sig-paren">(</span><em>outfile=None</em>, <em>section=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#ConfigObj.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj.write"title="Permalink to this definition">¶</a></dt>
<dd><p>Write the current ConfigObj as a file</p>
<p>tekNico: FIXME: use StringIO instead of real files</p>
<codeclass="descname">_keyword</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._keyword"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_listvalueexp</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._listvalueexp"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_multi_line_double</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._multi_line_double"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_multi_line_single</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._multi_line_single"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_nolistvalue</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._nolistvalue"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_sectionmarker</code><emclass="property"> = <_sre.SRE_Pattern object at 0x9cb2d18></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._sectionmarker"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_single_line_double</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._single_line_double"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_single_line_single</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._single_line_single"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_triple_quote</code><emclass="property"> = {"'''": (<_sre.SRE_Pattern object at 0x42e8a480>, <_sre.SRE_Pattern object at 0x42c34d20>), '"""': (<_sre.SRE_Pattern object at 0x42e8a138>, <_sre.SRE_Pattern object at 0x42e54020>)}</em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._triple_quote"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_valueexp</code><emclass="property"> = <_sre.SRE_Pattern object at 0x9c9e758></em><aclass="headerlink"href="#terminatorlib.configobj.configobj.ConfigObj._valueexp"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">SimpleVal</code><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#SimpleVal"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.SimpleVal"title="Permalink to this definition">¶</a></dt>
Can be used to check that all members expected are present.</p>
<p>To use it, provide a configspec with all your members in (the value given
will be ignored). Pass an instance of <codeclass="docutils literal"><spanclass="pre">SimpleVal</span></code> to the <codeclass="docutils literal"><spanclass="pre">validate</span></code>
method of your <codeclass="docutils literal"><spanclass="pre">ConfigObj</span></code>. <codeclass="docutils literal"><spanclass="pre">validate</span></code> will return <codeclass="docutils literal"><spanclass="pre">True</span></code> if all
members are present, or a dictionary with True/False meaning
present/missing. (Whole missing sections will be replaced with <codeclass="docutils literal"><spanclass="pre">False</span></code>)</p>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#SimpleVal.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.SimpleVal.__init__"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">check</code><spanclass="sig-paren">(</span><em>check</em>, <em>member</em>, <em>missing=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#SimpleVal.check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.SimpleVal.check"title="Permalink to this definition">¶</a></dt>
<dd><p>A dummy check method, always returns the value unchanged.</p>
<codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">flatten_errors</code><spanclass="sig-paren">(</span><em>cfg</em>, <em>res</em>, <em>levels=None</em>, <em>results=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#flatten_errors"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.flatten_errors"title="Permalink to this definition">¶</a></dt>
<dd><p>An example function that will turn a nested dictionary of results
(as returned by <codeclass="docutils literal"><spanclass="pre">ConfigObj.validate</span></code>) into a flat list.</p>
<p><codeclass="docutils literal"><spanclass="pre">cfg</span></code> is the ConfigObj instance being checked, <codeclass="docutils literal"><spanclass="pre">res</span></code> is the results
dictionary returned by <codeclass="docutils literal"><spanclass="pre">validate</span></code>.</p>
<p>(This is a recursive function, so you shouldn’t use the <codeclass="docutils literal"><spanclass="pre">levels</span></code> or
<codeclass="docutils literal"><spanclass="pre">results</span></code> arguments - they are used by the function.)</p>
<p>Returns a list of keys that failed. Each member of the list is a tuple:</p>
<divclass="highlight-python"><divclass="highlight"><pre>([list of sections...], key, result)
</pre></div>
</div>
<p>If <codeclass="docutils literal"><spanclass="pre">validate</span></code> was called with <codeclass="docutils literal"><spanclass="pre">preserve_errors=False</span></code> (the default)
then <codeclass="docutils literal"><spanclass="pre">result</span></code> will always be <codeclass="docutils literal"><spanclass="pre">False</span></code>.</p>
<p><em>list of sections</em> is a flattened list of sections that the key was found
in.</p>
<p>If the section was missing (or a section was expected and a scalar provided
- or vice-versa) then key will be <codeclass="docutils literal"><spanclass="pre">None</span></code>.</p>
<p>If the value (or section) was missing then <codeclass="docutils literal"><spanclass="pre">result</span></code> will be <codeclass="docutils literal"><spanclass="pre">False</span></code>.</p>
<p>If <codeclass="docutils literal"><spanclass="pre">validate</span></code> was called with <codeclass="docutils literal"><spanclass="pre">preserve_errors=True</span></code> and a value
was present, but failed the check, then <codeclass="docutils literal"><spanclass="pre">result</span></code> will be the exception
object returned. You can use this as a string that describes the failure.</p>
<p>For example <em>The value “3” is of the wrong type</em>.</p>
<codeclass="descclassname">terminatorlib.configobj.configobj.</code><codeclass="descname">get_extra_values</code><spanclass="sig-paren">(</span><em>conf</em>, <em>_prepend=()</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/configobj.html#get_extra_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.configobj.get_extra_values"title="Permalink to this definition">¶</a></dt>
<dd><p>Find all the values and sections not in the configspec from a validated
ConfigObj.</p>
<p><codeclass="docutils literal"><spanclass="pre">get_extra_values</span></code> returns a list of tuples where each tuple represents
either an extra section, or an extra value.</p>
<p>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 <codeclass="docutils literal"><spanclass="pre">('foo',)</span></code>. For members in the ‘bar’
subsection of the ‘foo’ section the first member will be <codeclass="docutils literal"><spanclass="pre">('foo',</span><spanclass="pre">'bar')</span></code>.</p>
<p>NOTE: If you call <codeclass="docutils literal"><spanclass="pre">get_extra_values</span></code> on a ConfigObj instance that hasn’t
<spanid="terminatorlib-configobj-validate-module"></span><h2>terminatorlib.configobj.validate module<aclass="headerlink"href="#module-terminatorlib.configobj.validate"title="Permalink to this headline">¶</a></h2>
<p>The Validator object is used to check that supplied values
conform to a specification.</p>
<p>The value can be supplied as a string - e.g. from a config file.
In this case the check will also <em>convert</em> the value to
the required type. This allows you to add validation
as a transparent layer to access data stored as strings.
The validation checks that the data is correct <em>and</em>
converts it to the expected type.</p>
<p>Some standard checks are provided for basic data types.
Additional checks are easy to write. They can be
provided when the <codeclass="docutils literal"><spanclass="pre">Validator</span></code> is instantiated or
added afterwards.</p>
<p>The standard functions work with the following basic data types :</p>
<ulclass="simple">
<li>integers</li>
<li>floats</li>
<li>booleans</li>
<li>strings</li>
<li>ip_addr</li>
</ul>
<p>plus lists of these datatypes</p>
<p>Adding additional checks is done through coding simple functions.</p>
<spanclass="n">integer</span><spanclass="p">(</span><spanclass="mi">3</span><spanclass="p">,</span><spanclass="mi">9</span><spanclass="p">)</span><spanclass="c"># any value from 3 to 9</span>
<spanclass="n">integer</span><spanclass="p">(</span><spanclass="nb">min</span><spanclass="o">=</span><spanclass="mi">0</span><spanclass="p">)</span><spanclass="c"># any positive value</span>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">ValidateError</code><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#ValidateError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.ValidateError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtUnknownCheckError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtUnknownCheckError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtUnknownCheckError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtUnknownCheckError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtUnknownCheckError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtParamError</code><spanclass="sig-paren">(</span><em>name</em>, <em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtParamError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtParamError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>name</em>, <em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtParamError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtParamError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtTypeError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtTypeError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtTypeError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtTypeError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtTypeError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtValueError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtValueTooSmallError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooSmallError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooSmallError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooSmallError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooSmallError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtValueTooBigError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooBigError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooBigError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooBigError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooBigError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtValueTooShortError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooShortError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooShortError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooShortError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooShortError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtValueTooLongError</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooLongError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooLongError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtValueTooLongError.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtValueTooLongError.__init__"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">VdtMissingValue</code><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#VdtMissingValue"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.VdtMissingValue"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">Validator</code><spanclass="sig-paren">(</span><em>functions=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">__init__</code><spanclass="sig-paren">(</span><em>functions=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator.__init__"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_check_value</code><spanclass="sig-paren">(</span><em>value</em>, <em>fun_name</em>, <em>fun_args</em>, <em>fun_kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._check_value"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._check_value"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_handle_none</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._handle_none"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._handle_none"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_list_handle</code><spanclass="sig-paren">(</span><em>listmatch</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._list_handle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._list_handle"title="Permalink to this definition">¶</a></dt>
<dd><p>Take apart a <codeclass="docutils literal"><spanclass="pre">keyword=list('val,</span><spanclass="pre">'val')</span></code> type string.</p>
<codeclass="descname">_parse_check</code><spanclass="sig-paren">(</span><em>check</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._parse_check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._parse_check"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_parse_with_caching</code><spanclass="sig-paren">(</span><em>check</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._parse_with_caching"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._parse_with_caching"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_pass</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._pass"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._pass"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_unquote</code><spanclass="sig-paren">(</span><em>val</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator._unquote"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._unquote"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">check</code><spanclass="sig-paren">(</span><em>check</em>, <em>value</em>, <em>missing=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator.check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator.check"title="Permalink to this definition">¶</a></dt>
<dd><p>Usage: check(check, value)</p>
<dlclass="docutils">
<dt>Arguments:</dt>
<dd>check: string representing check to apply (including arguments)
value: object to be checked</dd>
</dl>
<p>Returns value, converted to correct type if necessary</p>
<p>If the check fails, raises a <codeclass="docutils literal"><spanclass="pre">ValidateError</span></code> subclass.</p>
<codeclass="descname">get_default_value</code><spanclass="sig-paren">(</span><em>check</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#Validator.get_default_value"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator.get_default_value"title="Permalink to this definition">¶</a></dt>
<dd><p>Given a check, return the default value for the check
(converted to the right type).</p>
<p>If the check doesn’t specify a default value then a
<codeclass="docutils literal"><spanclass="pre">KeyError</span></code> will be raised.</p>
<codeclass="descname">_func_re</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._func_re"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_key_arg</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._key_arg"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_list_arg</code><emclass="property"> = <_sre.SRE_Pattern object at 0x9cc0830></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._list_arg"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_list_members</code><emclass="property"> = <_sre.SRE_Pattern object></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._list_members"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_matchfinder</code><emclass="property"> = <_sre.SRE_Pattern object at 0x9cc2db8></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._matchfinder"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_paramfinder</code><emclass="property"> = <_sre.SRE_Pattern object at 0x9cc1f08></em><aclass="headerlink"href="#terminatorlib.configobj.validate.Validator._paramfinder"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">dottedQuadToNum</code><spanclass="sig-paren">(</span><em>ip</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#dottedQuadToNum"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.dottedQuadToNum"title="Permalink to this definition">¶</a></dt>
<dd><p>Convert decimal dotted quad string to long integer</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">numToDottedQuad</code><spanclass="sig-paren">(</span><em>num</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#numToDottedQuad"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.numToDottedQuad"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_integer</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_integer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_integer"title="Permalink to this definition">¶</a></dt>
<dd><p>A check that tests that a given value is an integer (int, or long)
and optionally, between bounds. A negative value is accepted, while
a float will fail.</p>
<p>If the value is a string, then the conversion is done - if possible.
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_float</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_float"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_float"title="Permalink to this definition">¶</a></dt>
<dd><p>A check that tests that a given value is a float
(an integer will be accepted), and optionally - that it is between bounds.</p>
<p>If the value is a string, then the conversion is done - if possible.
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_boolean</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_boolean"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_boolean"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the value represents a boolean.</p>
<spanclass="gr">VdtTypeError</span>: <spanclass="n">the value "up" is of the wrong type.</span>
</pre></div>
</div>
</dd></dl>
<dlclass="function">
<dtid="terminatorlib.configobj.validate.is_list">
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of values.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_tuple</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_tuple"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_tuple"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a tuple of values.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_ip_addr</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_ip_addr"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_ip_addr"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the supplied value is an Internet Protocol address, v.4,
represented by a dotted-quad string, i.e. ‘1.2.3.4’.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_string</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_string"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_string"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the supplied value is a string.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_int_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_int_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_int_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of integers.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<p>Each list member is checked that it is an integer.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_bool_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_bool_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_bool_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of booleans.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<p>Each list member is checked that it is a boolean.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_float_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_float_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_float_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of floats.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<p>Each list member is checked that it is a float.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_string_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_string_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_string_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of strings.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<p>Each list member is checked that it is a string.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_ip_addr_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>min=None</em>, <em>max=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_ip_addr_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_ip_addr_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list of IP addresses.</p>
<p>You can optionally specify the minimum and maximum number of members.</p>
<p>Each list member is checked that it is an IP address.</p>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_mixed_list</code><spanclass="sig-paren">(</span><em>value</em>, <em>*args</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_mixed_list"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_mixed_list"title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the value is a list.
Allow specifying the type of each member.
Work on lists of specific lengths.</p>
<p>You specify each member as a positional argument specifying type</p>
<dlclass="docutils">
<dt>Each type should be one of the following strings :</dt>
<spanclass="gr">VdtValueTooLongError</span>: <spanclass="n">the value "(1, 2.0, '1.2.3.4', 'a', 1, 'b')" is too long.</span>
<codeclass="descclassname">terminatorlib.configobj.validate.</code><codeclass="descname">is_option</code><spanclass="sig-paren">(</span><em>value</em>, <em>*options</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/terminatorlib/configobj/validate.html#is_option"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#terminatorlib.configobj.validate.is_option"title="Permalink to this definition">¶</a></dt>
<dd><p>This check matches the value to any of a set of options.</p>
<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-terminatorlib.configobj"title="Permalink to this headline">¶</a></h2>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.