def handle_command(self, command): # Get param list corresponding to command params = self.get_param_list(command) result = json_rpc.get_answer(self.addr, 'call', params) print(result['answer']) if (result['refresh']): self.load_commands(result['root'])
def connect(self, host, port): self.init = False self.addr = (host, port) result = json_rpc.get_answer(self.addr, 'list') self.load_commands(result) self.run()