edisgo.tools.config =================== .. py:module:: edisgo.tools.config Classes ------- .. toctree:: :hidden: /autoapi/edisgo/tools/config/Config .. autoapisummary:: edisgo.tools.config.Config Functions --------- .. autoapisummary:: edisgo.tools.config.load_config edisgo.tools.config.get edisgo.tools.config.get_default_config_path edisgo.tools.config.make_directory Module Contents --------------- .. py:function:: load_config(filename, config_dir=None, copy_default_config=True) Loads the specified config file. :param filename: Config file name, e.g. 'config_grid.cfg'. :type filename: str :param config_dir: 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. :type config_dir: str, optional :param copy_default_config: If True copies a default config file into `config_dir` if the specified config file does not exist. Default: True. :type copy_default_config: bool .. py:function:: get(section, key) Returns the value of a given key of a given section of the main config file. :param section: :type section: str :param key: :type key: str :returns: The value which will be casted to float, int or boolean. If no cast is successful, the raw string is returned. :rtype: float or int or bool or str .. py:function:: 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'. :rtype: str .. py:function:: make_directory(directory) Makes directory if it does not exist. :param directory: Directory path :type directory: str