exopy.app.preferences.plugin module

Preferences plugin definition.

class exopy.app.preferences.plugin.PrefPlugin[source]

Bases: enaml.workbench.plugin.Plugin

Plugin responsible for managing the application preferences.

app_directory

Folder used by the application to store informations such as preferences log files, …

last_directory

Path of the last location visited using a dialog.

start()[source]

Start the plugin, locate app folder and load default preferences.

stop()[source]

Stop the plugin.

save_preferences(path=None)[source]

Collect and save preferences for all registered plugins.

Parameters

path (unicode, optional) – Path of the file in which save the preferences. In its absence the default file is used.

load_preferences(path=None)[source]

Load preferences and update all registered plugin.

Parameters

path (unicode, optional) – Path to the file storing the preferences. In its absence default preferences are loaded.

plugin_init_complete(plugin_id)[source]

Notify the preference plugin that a plugin has started properly.

The associated command should be called by a plugin once it has started and loaded its preferences. This call is necessary to avoid overriding values for auto-save members by default values.

Parameters

plugin_id (str) – Id of the plugin which has started.

get_plugin_preferences(plugin_id)[source]

Access to the preferences values stored for a plugin.

Parameters

plugin_id (unicode) – Id of the plugin whose preferences values should be returned.

Returns

prefs – Preferences for the plugin as a dict.

Return type

dict(str, str)

open_editor()[source]