Configuration Loading

Functions for loading the configuration file

The Abed configuration is loaded into a Settings object, after some preprocessing of the options. The preprocessing functions and the Settings class are defined here.

This module also creates a settings variable, which is an instance of the Settings class. It is supposed to be used as singleton object, by importing it from this module:

from abed.conf import settings
class abed.conf.Settings(**entries)[source]

Bases: object

Simple Settings class

This class functions as a simple key/value store, with one exception. If a key is not available in the class, an error is displayed and the program exits cleanly.

abed.conf.init_config()[source]

Initialize the Settings object from the configuration file

This function reads the configuration file by parsing it as Python code. Next, it deletes all lowercase variables from the configuration and removes any trailing path seperators from directory names. Finally, it instantiates a Settings object containing the configuration.

Returns

settings – The Settings object containing the configuration from the configuration file.

Return type

Settings