Trees | Indices | Help |
|
---|
|
object --+ | ConfigParser
Parses flat key-value pairs in a text file.
Removes quotes from quoted strings.
A list of tuples makes possible the use of many times the same key. That is lost if you convert the result to a dict.
This ConfigParser is different from the one from the ConfigParser module, since it does not use the concept of sections. Also, there can be many options with the same key name. This class is partly insprired from ConfigParser.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
STRIPPED =
|
|||
ASSIGNATION_OPERATORS =
|
|||
COMMENTERS =
|
|||
_boolean_states =
|
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Attempts to read a file and parse its configuration entries. It might throw a ParsingError. |
Get an option value as a string. The cast argument allows you to cast the type of the value to int, float or bool. Just pass it a type. Might raise a NoSuchOptionError if the option is not found. Might raise a ValueError if the value is not of the given type. If a key is defined many times, behavious is undefined. It it likely to return the last item with that key. Note that the accepted values for the option are "1", "yes", "true", and "on", which cause this method to return True, and "0", "no", "false", and "off", which cause it to return False. These string values are checked in a case-insensitive manner. Any other value will cause it to raise ValueError. |
Casts a value to a given type. Type can be int, float, str or bool. |
|
_boolean_states
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 29 13:08:12 2009 | http://epydoc.sourceforge.net |