Package PyFoam :: Package Infrastructure :: Module Configuration :: Class Configuration
[hide private]
[frames] | no frames]

Class Configuration

source code

ConfigParser.RawConfigParser --+    
                               |    
       ConfigParser.ConfigParser --+
                                   |
                                  Configuration

Reads the settings from files (if existing). Otherwise uses hardcoded defaults

Instance Methods [hide private]
 
__init__(self)
Constructs the ConfigParser and fills it with the hardcoded defaults
source code
 
bestSection(self, section, option)
Get the best-fitting section that has that option
source code
 
configSearchPath(self)
Defines a search path for the configuration files as a pare of type/name pairs
source code
 
configFiles(self)
Return a list with the configurationfiles that are going to be used
source code
 
addFile(self, filename, silent=False)
Add another file to the configuration (if it exists)
source code
 
dump(self)
Dumps the contents in INI-Form
source code
 
getboolean(self, section, option, default=None)
Overrides the original implementation from ConfigParser
source code
 
getfloat(self, section, option, default=None)
Overrides the original implementation from ConfigParser
source code
 
get(self, section, option, default=None)
Overrides the original implementation from ConfigParser
source code
 
getdebug(self, name)
Gets a debug switch
source code

Inherited from ConfigParser.ConfigParser: items

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

Inherited from ConfigParser.RawConfigParser: add_section, defaults, getint, has_option, has_section, options, optionxform, read, 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, SECTCRE

Inherited from ConfigParser.RawConfigParser (private): _boolean_states

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructs the ConfigParser and fills it with the hardcoded defaults

Overrides: ConfigParser.RawConfigParser.__init__

dump(self)

source code 

Dumps the contents in INI-Form

Returns:
a string with the contents

getboolean(self, section, option, default=None)

source code 

Overrides the original implementation from ConfigParser

Parameters:
  • section - the section
  • option - the option
  • default - if set and the option is not found, then this value is used
Overrides: ConfigParser.RawConfigParser.getboolean

getfloat(self, section, option, default=None)

source code 

Overrides the original implementation from ConfigParser

Parameters:
  • section - the section
  • option - the option
  • default - if set and the option is not found, then this value is used
Overrides: ConfigParser.RawConfigParser.getfloat

get(self, section, option, default=None)

source code 

Overrides the original implementation from ConfigParser

Parameters:
  • section - the section
  • option - the option
  • default - if set and the option is not found, then this value is used
Overrides: ConfigParser.RawConfigParser.get