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
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'PyFoam.Infrastructure.Configuration'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 51¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
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
-
-
class
PyFoam.Infrastructure.Configuration.
ConfigurationSectionProxy
(conf, section)[source]¶ Bases:
object
Wraps a Confguration so that the section automatically becomes the first argument
-
__dict__
= mappingproxy({'__module__': 'PyFoam.Infrastructure.Configuration', '__doc__': 'Wraps a Confguration so that the section automatically becomes the\n first argument', '__init__': <function ConfigurationSectionProxy.__init__>, '__getattr__': <function ConfigurationSectionProxy.__getattr__>, '__dict__': <attribute '__dict__' of 'ConfigurationSectionProxy' objects>, '__weakref__': <attribute '__weakref__' of 'ConfigurationSectionProxy' objects>})¶
-
__module__
= 'PyFoam.Infrastructure.Configuration'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-