def getPluginConfParams(self,pathPlugin): info = XMLParser(pathPlugin+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir+"/"+code+"/conf.xml"): params = info.getAllValues("conf-values") params.append(("status","0")) else: prefs = info.getAllValues("conf-values") prefs.append(("status","0")) info = XMLParser(plugindir+"/"+code+"/conf.xml") params = [] for pref in prefs: params.append((pref[0],info.getValue("pytrainer-plugin",pref[0]))) return params
def getPluginConfParams(self, pathPlugin): info = XMLParser(pathPlugin + "/conf.xml") code = info.getValue("pytrainer-plugin", "plugincode") plugindir = self.pytrainer_main.profile.plugindir if not os.path.isfile(plugindir + "/" + code + "/conf.xml"): params = info.getAllValues("conf-values") params.append(("status", "0")) else: prefs = info.getAllValues("conf-values") prefs.append(("status", "0")) info = XMLParser(plugindir + "/" + code + "/conf.xml") params = [] for pref in prefs: params.append( (pref[0], info.getValue("pytrainer-plugin", pref[0]))) return params
def getExtensionConfParams(self,pathExtension): info = XMLParser(pathExtension+"/conf.xml") code = info.getValue("pytrainer-extension","extensioncode") extensiondir = self.pytrainer_main.profile.extensiondir params = {} if not os.path.isfile(extensiondir+"/"+code+"/conf.xml"): prefs = info.getAllValues("conf-values") prefs.append(("status","0")) for pref in prefs: params[pref[0]] = info.getValue("pytrainer-extension",pref[0]) else: prefs = info.getAllValues("conf-values") prefs.append(("status","0")) info = XMLParser(extensiondir+"/"+code+"/conf.xml") for pref in prefs: params[pref[0]] = info.getValue("pytrainer-extension",pref[0]) #params.append((pref[0],info.getValue("pytrainer-extension",pref[0]))) return params