From e17f45d9ab2ca15bda473d8510d3f78d8c2323ef Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Wed, 2 Mar 2016 18:20:24 -0800 Subject: ok now we are talking...got plugins to work --- pluginloader.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 pluginloader.py (limited to 'pluginloader.py') diff --git a/pluginloader.py b/pluginloader.py deleted file mode 100644 index 1f568d4..0000000 --- a/pluginloader.py +++ /dev/null @@ -1,19 +0,0 @@ -import imp -import os - -PluginFolder = "./photoblaster/modules_src" -MainModule = "__init__" - -def getPlugins(): - plugins = [] - possibleplugins = os.listdir(PluginFolder) - for i in possibleplugins: - location = os.path.join(PluginFolder, i) - if not os.path.isdir(location) or not MainModule + ".py" in os.listdir(location): - continue - info = imp.find_module(MainModule, [location]) - plugins.append({"name": i, "info": info}) - return plugins - -def loadPlugin(plugin): - return imp.load_module(MainModule, *plugin["info"]) -- cgit v1.2.3-70-g09d2