config¶
Manages configuration options.
- options = {'caching': False, 'classkit': False, 'session': 'platform-dependent'}¶
Default values for configuration options.
- option(name=None, value=None)[source]¶
Sets or returns the value of a configuration option.
If called without arguments, returns all configuration options as a dictionary. Returns an option’s value if only called with the option’s
name. Otherwise sets the option to the givenvalue.
- location()[source]¶
Returns the default location of the configuration file.
The folder returned by this function is platform-specific. It is inside the user’s
AppDatafolder on Windows, inside.configin the home directory on Linux, and inApplication Supporton macOS.
- load(file=None)[source]¶
Loads the configuration from the given
.inifile.If
fileis not given, looks for a configuration file namedMPh.iniin the current directory, or in the folder inside the user profile as returned bylocation(), or in this library’s folder, in that order. If no such file is found, the hard-coded default values are used.