emsm.core.conf¶
-
class
emsm.core.conf.ConfigParser(path)[source]¶ Bases:
configparser.ConfigParserExtends the standard Python
configparser.ConfigParserby some useful methods.Parameters: path (str) – The path to the configuration file. This file is used, when you call read()orwrite().
-
class
emsm.core.conf.MainConfiguration(path)[source]¶ Bases:
emsm.core.conf.ConfigParserHandles the
main.confconfiguration file.This file includes the configuration for the EMSM Application and the plugins.
The EMSM owns the
[emsm]section and each plugin has its own section with the plugin name.[emsm] user = minecraft timeout = 0 screenrc = [backups] include_server = ... # ...
-
class
emsm.core.conf.ServerConfiguration(path)[source]¶ Bases:
emsm.core.conf.ConfigParserHandles the server.conf configuration file, which allows the user to overwrite the default EMSM settings for a server wrapper like the url or the start command.
-
class
emsm.core.conf.WorldConfiguration(path)[source]¶ Bases:
emsm.core.conf.ConfigParserHandles a configuration file for one world and allows the user to set custom configuration values for each plugin, server and the EMSM.
Parameters: path (str) –
-
class
emsm.core.conf.Configuration(app)[source]¶ Bases:
objectManages all configuration files of an EMSM application object.
See also
emsm.core.application.Application.conf()emsm.core.paths.Pathsystem.conf_dir()
-
list_worlds()[source]¶ Returns a list with the names of all worlds, for which a configuration file has been found.
-
main()[source]¶ Returns the
MainConfiguration.
-
server()[source]¶ Returns the
ServerConfiguration.
-
world(name)[source]¶ Returns the
WorldConfigurationfor the world with the name name andNone, if there is not such a world.
-
worlds()[source]¶ Returns a list with all
WorldConfigurationobjects.