Package cherrypy :: Module _cpconfig :: Class _Parser
[hide private]
[frames] | no frames]

Class _Parser

source code

ConfigParser.RawConfigParser --+    
                               |    
       ConfigParser.ConfigParser --+
                                   |
                                  _Parser

Sub-class of ConfigParser that keeps the case of options and that raises an exception if the file cannot be read.

Instance Methods [hide private]
 
optionxform(self, optionstr) source code
 
read(self, filenames)
Read and parse a filename or a list of filenames.
source code
 
as_dict(self, raw=False, vars=None)
Convert an INI file to a dictionary
source code
 
dict_from_file(self, file) source code

Inherited from ConfigParser.ConfigParser: get, items

Inherited from ConfigParser.ConfigParser (private): _interpolate, _interpolation_replace

Inherited from ConfigParser.RawConfigParser: __init__, add_section, defaults, getboolean, getfloat, getint, has_option, has_section, options, readfp, remove_option, remove_section, sections, set, write

Inherited from ConfigParser.RawConfigParser (private): _get, _read

Class Variables [hide private]

Inherited from ConfigParser.ConfigParser (private): _KEYCRE

Inherited from ConfigParser.RawConfigParser: OPTCRE, OPTCRE_NV, SECTCRE

Inherited from ConfigParser.RawConfigParser (private): _boolean_states

Method Details [hide private]

optionxform(self, optionstr)

source code 
Overrides: ConfigParser.RawConfigParser.optionxform

read(self, filenames)

source code 

Read and parse a filename or a list of filenames.

Files that cannot be opened are silently ignored; this is designed so that you can specify a list of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the list will be read. A single filename may also be given.

Return list of successfully read files.

Overrides: ConfigParser.RawConfigParser.read
(inherited documentation)