def writeConfig(self): # Text widget has an extra \n # The tkinter text widget guarantees that there is always a newline following the last character in the widget. data = self.edit.get('1.0', 'end-1c') with open(config.config_file, 'w') as f: f.write(data) self.tip.config(text='Settings was Saved!') self.after(2000, lambda: self.tip.config(text='')) global config config = getConfig(config.config_file) server.reload(config)
def get_config(self, key): return getConfig().getAddonConfig('weinre', key)