Package Products :: Package ZenUtils :: Module config :: Class SettingLine |
[hide private]
[frames] | no frames]

# Class SettingLine

source code

    object --+
             |
    ConfigLine --+
                 |
                SettingLine

Represents a config line with a `key = value` pair.

Instance Methods | [hide private]
__init__(self, key, value=None, delim='=') | source code
setting(self) Return a key, value tuple if this line represents a setting. | source code
__str__(self) | source code

Class Methods | [hide private]
checkError(cls, line, lineno) Checks the string for possible matches, considers why it doesn't match exactly if it's close and returns a ConfigLineError. | source code
parse(cls, line) Returns an instance of cls if this class can parse this line. | source code

Class Variables | [hide private]
| _regexp = `re.compile(r'^(?P<key>[a-z][a-z\d_]*)\s*(?P<delim>(=`...``

Method Details | [hide private]

### __init__(self, key, value=None, delim='=') (Constructor) | source code
Overrides: ConfigLine.__init__

### setting(self) | source code
Return a key, value tuple if this line represents a setting. Implemented in base classes. Decorators: `@property` Overrides: ConfigLine.setting (inherited documentation)

### __str__(self) (Informal representation operator) | source code
Overrides: ConfigLine.__str__

### checkError(cls, line, lineno) Class Method | source code
Checks the string for possible matches, considers why it doesn't match exactly if it's close and returns a ConfigLineError. Implemented in base classes. Overrides: ConfigLine.checkError (inherited documentation)

### parse(cls, line) Class Method | source code
Returns an instance of cls if this class can parse this line. Otherwise returns None. Implemented in base classes. Overrides: ConfigLine.parse (inherited documentation)

Class Variable Details | [hide private]

  ### _regexp Value:
      re.compile(r'^(?P<key>[a-z][a-z\d_]*)\s*(?P<delim>(=|:|\s)+)\s*(?P<val
      ue>.+)$', re.I)