Mercurial > fife-parpg
comparison clients/editor/scripts/plugin.py @ 359:ad5818097cd6
* Some cleanups for Editor class to match new coding standards
* Minor cleanups in imports
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 26 Sep 2009 10:38:24 +0000 |
parents | 8b125ec749d7 |
children | 3827b510546f |
comparison
equal
deleted
inserted
replaced
358:8f64a9d1e7ab | 359:ad5818097cd6 |
---|---|
20 # Free Software Foundation, Inc., | 20 # Free Software Foundation, Inc., |
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 # #################################################################### | 22 # #################################################################### |
23 | 23 |
24 import os | 24 import os |
25 import editor | |
26 | 25 |
27 class PluginManager: | 26 class PluginManager: |
28 """ Currently, pluginmanager iterates through the plugin directory | 27 """ Currently, pluginmanager iterates through the plugin directory |
29 adding the plugins if they are set to True in settings.xml. If a plugin | 28 adding the plugins if they are set to True in settings.xml. If a plugin |
30 isn't set in settings.xml it assumes it is not to be loaded, and saves it | 29 isn't set in settings.xml it assumes it is not to be loaded, and saves it |
31 as False in settings.xml. | 30 as False in settings.xml. |
32 | 31 |
33 If a plugin fails to load due to exceptions, they are caught and a line | 32 If a plugin fails to load due to exceptions, they are caught and a line |
34 of the error is printed to console. | 33 of the error is printed to console. |
35 """ | 34 """ |
36 def __init__(self, *args, **kwargs): | 35 def __init__(self, settings, *args, **kwargs): |
37 self._settings = editor.getEditor().getSettings() | 36 self._settings = settings |
38 | 37 |
39 self._pluginDir = "plugins" | 38 self._pluginDir = "plugins" |
40 self._plugins = [] | 39 self._plugins = [] |
41 | 40 |
42 files = [] | 41 files = [] |