config.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: config
  3. .. _config:
  4. Module config
  5. =============
  6. Configuration Module.
  7. This reads the configuration file and conveniently makes the settings available to KCG
  8. .. py:class:: NoValueException(Exception)
  9. Simple Exception that gets thrown when no Value was given in the configuration file
  10. .. py:class:: MisconfigurationError(Exception)
  11. Simple Exception to indicate that a misconfiguration was found.
  12. .. py:method:: leval(string)
  13. Wrapper arount ast.literal_eval that throws NoValueException if the value was empty
  14. :param string:
  15. .. py:class:: ConfSection(object)
  16. Class to handle a section in the configuration.
  17. .. py:method:: __init__(self, section, settings, config_object, default_config_object=None, log_level=logging.ERROR)
  18. .. py:method:: feed_arguments(self, arg_dict)
  19. Feed this section with commandline arguments for this section. The given arguments will
  20. override the ones in configuration files.
  21. :param arg_dict: the dictionary for all sections
  22. .. py:method:: read(self)
  23. Read and evaluate configuration settings.
  24. .. py:class:: Configuration(object)
  25. Class to handle configuration
  26. .. py:method:: __init__(self, args=None, log_level=logging.INFO)
  27. .. py:method:: parse_command_line(self)
  28. Parses the command line configuration arguments
  29. .. py:method:: read(self)
  30. This function reads the configuration file and the default config fille (in case the
  31. user config file does not contain all values) and adds them as parameters to this module
  32. .. py:method:: setup(self)
  33. Check for the user config file and if not exists calls doSetup
  34. .. py:method:: doSetup(self, rerun=False, parent=None)
  35. Shows the initial config dialog