Logo Search packages:      
Sourcecode: feed2omb version File versions  Download package

def configobj::TemplateInterpolation::_parse_match (   self,
) [private]
Implementation-dependent helper function.

Will be passed a match object corresponding to the interpolation
key we just found (e.g., "%(foo)s" or "$foo"). Should look up that
key in the appropriate config file section (using the ``_fetch()``
helper function) and return a 3-tuple: (key, value, section)

``key`` is the name of the key we're looking for
``value`` is the value found for that key
``section`` is a reference to the section where it was found

``key`` and ``section`` should be None if no further
interpolation should be performed on the resulting value
(e.g., if we interpolated "$$" and returned "$").

Reimplemented from configobj::InterpolationEngine.

Definition at line 465 of file configobj.py.

        # Valid name (in or out of braces): fetch value from section
        key = match.group('named') or match.group('braced')
        if key is not None:
            value, section = self._fetch(key)
            return key, value, section
        # Escaped delimiter (e.g., $$): return single delimiter
        if match.group('escaped') is not None:
            # Return None for key and section to indicate it's time to stop
            return None, self._delimiter, None
        # Anything else: ignore completely, just return it unchanged
        return None, match.group(), None

Generated by  Doxygen 1.6.0   Back to index