edisgo.tools.config
Classes
Container for all configurations. |
Functions
|
Loads the specified config file. |
|
Returns the value of a given key of a given section of the main |
Returns the basic edisgo config path. If it does not yet exist it creates |
|
|
Makes directory if it does not exist. |
Module Contents
- edisgo.tools.config.load_config(filename, config_dir=None, copy_default_config=True)
Loads the specified config file.
- Parameters:
filename (str) – Config file name, e.g. ‘config_grid.cfg’.
config_dir (str, optional) – Path to config file. If None uses default edisgo config directory specified in config file ‘config_system.cfg’ in section ‘user_dirs’ by subsections ‘root_dir’ and ‘config_dir’. Default: None.
copy_default_config (bool) – If True copies a default config file into config_dir if the specified config file does not exist. Default: True.
- edisgo.tools.config.get(section, key)
Returns the value of a given key of a given section of the main config file.
- edisgo.tools.config.get_default_config_path()
Returns the basic edisgo config path. If it does not yet exist it creates it and copies all default config files into it.
- Returns:
Path to default edisgo config directory specified in config file ‘config_system.cfg’ in section ‘user_dirs’ by subsections ‘root_dir’ and ‘config_dir’.
- Return type: