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

Class Configuration

source code

ThirdParty.six.moves.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
 
sectionProxy(self, section)
Return a proxy object that makes it possible to avoid the section specification
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
 
getList(self, section, option, default="", splitchar=",")
Get a list of strings (in the original they are separated by commas)
source code
 
getboolean(self, section, option, default=None)
Overrides the original implementation from ConfigParser
source code
 
getint(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
 
getRegexp(self, section, option)
Get an entry and interpret it as a regular expression.
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
Method Details [hide private]

dump(self)

source code 

Dumps the contents in INI-Form

Returns:
a string with the contents

getList(self, section, option, default="", splitchar=",")

source code 

Get a list of strings (in the original they are separated by commas)

Parameters:
  • section - the section
  • option - the option
  • default - if set and the option is not found, then this value is used
  • splitchar - the character by which the values are separated

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

getint(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

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

getRegexp(self, section, option)

source code 

Get an entry and interpret it as a regular expression. Subsitute the usual regular expression value for floating point numbers

Parameters:
  • section - the section
  • option - the option
  • default - if set and the option is not found, then this value is used

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