def do_execute(self, code, silent, store_history=True, user_expressions=None, allow_stdin=False):
        # if no command sent, just return
        if not code.strip():
            return {
                'status': 'ok',
                'execution_count': self.execution_count,
                'payload': [],
                'user_expressions': {},
            }

        if code[-1] == '?':
            return self.do_inspect(code, len(code) - 1)

        try:
            output = self.qsh.process_command(code)
        except KeyboardInterrupt:
            return {
                'status': 'abort',
                'execution_count': self.execution_count,
            }

        if not silent and output:
            stream_content = {'name': 'stdout', 'text': output}
            self.send_response(self.iopub_socket, 'stream', stream_content)

        return {
            'status': 'ok',
            'execution_count': self.execution_count,
            'payload': [],
            'user_expressions': {},
        }
dataset/ETHPy150Open qtile/qtile/libqtile/interactive/iqsh_kernel.py/QshKernel.do_execute/original