def reload_plugins(self): config = os.path.realpath(os.path.dirname (os.path.realpath (__file__)) + "/../s2wrapper.ini") ini = ConfigParser.ConfigParser() ini.read(config) for name in ini.options('plugins'): if name == 'admin': PluginsManager.reload(name) continue if ini.getboolean('plugins', name): PluginsManager.reload(name)
def onConsoleMessage (self, line): print "onConsoleMessage> %s" % line for plugin in PluginsManager.getEnabled (PluginsManager.ConsoleParser): plugin.onLineReceived (line, self.dh) pass
def onConsoleMessage(self, line): print "onConsoleMessage> %s" % line for plugin in PluginsManager.getEnabled(PluginsManager.ConsoleParser): plugin.onLineReceived(line, self.dh) pass
sys.exit(1) config = config_read(cfgdef) # read local config path_home = config.get('core', 'home') if path_home == ".": path_home = path_install else: path_home = os.path.expanduser(path_home) #path_home = os.path.join(path_home, dir_mod) cfgloc = os.path.join(path_home, conf_loc) if not config_exists(cfgloc, "Read '%s' for instructions" % (conf_def)): sys.exit(1) config_read(cfgloc, config) PluginsManager.discover(path_plugins) # enable listed plugins for name in config.options('plugins'): if name == 'admin': PluginsManager.enable(name) continue if config.getboolean('plugins', name): PluginsManager.enable(name) # write local config #config_write(cfgloc, config) # reset our terminal os.system('reset')
def __init__(self): self.pm = PluginsManager.Platform() self.action_list = self.pm.get_all_plugin() self.driver = Chrome.Chrome()