示例#1
0
    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)
示例#2
0
    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)
示例#3
0
 def get_config(self, key):
     return getConfig().getAddonConfig('weinre', key)
示例#4
0
 def get_config(self, key):
     return getConfig().getAddonConfig('weinre', key)