Finished re-implementing core
This commit is contained in:
parent
9c86ab0ba3
commit
7de5fbfd39
|
@ -67,15 +67,12 @@ class Manager:
|
|||
return
|
||||
## Disable the plugin and pop from sys.modules
|
||||
reenable = self.disablePlugin(name)
|
||||
for index,p in self.disabled:
|
||||
if p.name==name:
|
||||
break
|
||||
self.disabled.pop(index)
|
||||
del self.disabled[name]
|
||||
|
||||
#reload(self.disabled[name])
|
||||
reload(sys.modules[name])
|
||||
p = sys.modules[name].Plugin()
|
||||
self.disabled+=[p]
|
||||
self.disabled[name]=p
|
||||
if reenable == True:
|
||||
self.enablePlugin(name)
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ class Plugin(plugin.Plugin):
|
|||
plugin.Plugin.__init__(self)
|
||||
self.help = "Returns a short description of the plugin"
|
||||
|
||||
|
||||
def run(self, args=None):
|
||||
if args == None:
|
||||
plugin = "help"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# Basic plugin class
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Jan 21, 2010 12:11:23 PM$"
|
||||
|
||||
|
||||
from bt import plugin
|
||||
from manager import manager
|
||||
|
||||
|
||||
class Plugin(plugin.Plugin):
|
||||
def __init__(self):
|
||||
plugin.Plugin.__init__(self)
|
||||
self.help = "Closes, then reopens a plugin"
|
||||
|
||||
|
||||
def run(self, args=None):
|
||||
if args == None:
|
||||
return
|
||||
|
||||
for plugin in args:
|
||||
manager.reloadPlugin(plugin)
|
||||
|
Loading…
Reference in New Issue