def _handle_command(self, command):
    '\n        Handle command. This will run in a separate thread, in order not\n        to block the event loop.\n        '
    logger.info('Handle command %r', command)

    def in_executor():
        self.handling_command = True
        try:
            if (self.callback is not None):
                self.callback(self, command)
        finally:
            self.server.call_from_executor(done)

    def done():
        self.handling_command = False
        if (not self.closed):
            self.cli.reset()
            self.cli.buffers[DEFAULT_BUFFER].reset()
            self.cli.renderer.request_absolute_cursor_position()
            self.vt100_output.flush()
            self.cli._redraw()
    self.server.run_in_executor(in_executor)
Handle command. This will run in a separate thread, in order not
to block the event loop.
def _handle_command(self, command):
    '\n        Handle command. This will run in a separate thread, in order not\n        to block the event loop.\n        '
    logger.info('Handle command %r', command)

    def in_executor():
        self.handling_command = True
        try:
            if (self.callback is not None):
                self.callback(self, command)
        finally:
            self.server.call_from_executor(done)

    def done():
        self.handling_command = False
        if (not self.closed):
            self.cli.reset()
            self.cli.buffers[DEFAULT_BUFFER].reset()
            self.cli.renderer.request_absolute_cursor_position()
            self.vt100_output.flush()
            self.cli._redraw()
    self.server.run_in_executor(in_executor)