diff options
author | sebnapi <devnull@localhost> | 2009-05-10 20:53:15 +0200 |
---|---|---|
committer | sebnapi <devnull@localhost> | 2009-05-10 20:53:15 +0200 |
commit | 8f47147edd599a59b13d1c4602995971afb6b9df (patch) | |
tree | 465eb4e5e82734e1c32e9a44985131337eae0e19 /Core.py | |
parent | new plugin-sys (diff) | |
download | pyload-8f47147edd599a59b13d1c4602995971afb6b9df.tar.xz |
Py_load_File in own file
Diffstat (limited to 'Core.py')
-rw-r--r-- | Core.py | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -68,28 +68,28 @@ class Core(object): def get_avial_plugins(self, plugin_folder): """ searches the plugin-folder for plugins """ - #for file in glob(plugin_folder + "/" + '*.py'): - #if file.endswith('.py'): - #self.plugin_file = basename(file).replace('.py', '') - #print self.plugin_file - #try: - #self.new_plugin = __import__(self.plugin_file) - #if self.new_plugin.plugin_type in "hoster" or self.new_plugin.plugin_type in "container": - #print "Plugin geladen: " + self.new_plugin.plugin_name - #self.plugins[self.plugin_file] = __import__(self.plugin_file) - #except: - #print "Fehlerhaftes Plugin: " + self.plugin_file - pluginlist = [] - import os - for f in os.listdir(plugin_folder): - if f.split(".")[1] == "py": - pluginlist.append(__import__(f.split('.')[0],globals(),locals(),[])) - print pluginlist - for modul in pluginlist: - instance = modul.Test_plug() - print instance.Function() - print instance.pluginProp ['name'] - print "s" + for file in glob(plugin_folder + "/" + '*.py'): + if file.endswith('.py'): + self.plugin_file = basename(file).replace('.py', '') + print self.plugin_file + try: + self.new_plugin = __import__(self.plugin_file) + if self.new_plugin.plugin_type in "hoster" or self.new_plugin.plugin_type in "container": + print "Plugin geladen: " + self.new_plugin.plugin_name + self.plugins[self.plugin_file] = __import__(self.plugin_file) + except: + print "Fehlerhaftes Plugin: " + self.plugin_file + #plugindict = {} + #import os + #for f in os.listdir(plugin_folder): + #if f.split(".")[1] == "py": + #plugindict[f.split(".")[0]] = __import__(f.split('.')[0],globals(),locals(),[]) + #print plugindict + #for name, modul in plugindict.items(): + #instance = modul.name() + #print instance.Function() + #print instance.pluginProp ['name'] + #print "s" def _get_links(self, link_file): """ funktion nur zum testen ohne gui bzw. tui |