def getParams(self, **kwargs): found = {} for option in kwargs: if [l for l in CONFIG_DICT.values() if option in l]: section = reverseSearch(CONFIG_DICT, option) if section: found[option] = self.settings.value(section[0] + option) return found
def loadConfig(self): config = {} for section, options in CONFIG_DICT.iteritems(): for option in options: config[option] = self.settings.value(section + option) # arrange by alphabet params = [] for option in sorted(config): params.append(config[option]) return params
def updateConfig(self, **kwargs): for section, options in CONFIG_DICT.iteritems(): for option in options: if option in kwargs: self.settings.setValue(section + option, kwargs[option])