Lala Config Module

Config module

Changed in version 0.5.

The function set_default_options was removed. To achieve the same behaviour, set a module-level dict called “DEFAULT_OPTIONS” where the keys are the option names and the values are the default values in your plugin.

lala.config.get(key, converter=None)[source]

Returns the value of a config option. The section is the name of the calling file.

Default values for all keys can be set with set_default_options().

Parameters:key – The key to lookup

Returns the value of a config option as an int.

Parameters:*args – See lala.config.get()
Return type:int

Gets a list option.

Parameters:*args – See lala.config.get()
Return type:list of strings
lala.config.set(key, value, plugin=None)[source]

Sets the value of key. The section is the name of the calling file.

lala.config.set_list(key, value, *args)[source]

Sets option key to value where value is a list of values.

None of the values in value are allowed to contain lala.config._LIST_SEPARATOR.

This method does not preserve the type of the items in the list, they’re all passed through str().

lala.config._LIST_SEPARATOR = ','

Used as a separator when storing lists of values in the config file