PyFoam.Infrastructure.Configuration module¶
Reads configuration-files that define defaults for various PyFoam-Settings
Also hardcodes defaults for the settings
-
class
PyFoam.Infrastructure.Configuration.
Configuration
[source]¶ Bases:
configparser.ConfigParser
Reads the settings from files (if existing). Otherwise uses hardcoded defaults
-
configSearchPath
()[source]¶ Defines a search path for the configuration files as a pare of type/name pairs
-
get
(section, option, default=None, **kwargs)[source]¶ Overrides the original implementation from ConfigParser :param section: the section :param option: the option :param default: if set and the option is not found, then this value is used
-
getArch
(section, option)[source]¶ Get an entry. If an entry with <option>_<archname> exists then this is used instead of the plain <option>-entry :param section: the section :param option: the option
-
getList
(section, option, default='', splitchar=', ', stripQuotes=True)[source]¶ Get a list of strings (in the original they are separated by commas) :param section: the section :param option: the option :param default: if set and the option is not found, then this value is used :param splitchar: the character by which the values are separated :param stripQuotes: remove quotes if present
-
getRegexp
(section, option)[source]¶ Get an entry and interpret it as a regular expression. Subsitute the usual regular expression value for floating point numbers :param section: the section :param option: the option :param default: if set and the option is not found, then this value is used
-
getboolean
(section, option, default=None)[source]¶ Overrides the original implementation from ConfigParser :param section: the section :param option: the option :param default: if set and the option is not found, then this value is used
-
getchoice
(section, option, choices, default=None)[source]¶ Overrides the original implementation from ConfigParser :param section: the section :param option: the option :param choices: list of valid values :param default: if set and the option is not found, then this value is used
-
getfloat
(section, option, default=None)[source]¶ Overrides the original implementation from ConfigParser :param section: the section :param option: the option :param default: if set and the option is not found, then this value is used
-