def do_execute(self, code, silent, store_history=True, user_expressions=None, allow_stdin=False):
    ' kernel entry point for the execution of each cell\n        '
    try:
        output_lines = self.interp.execute(code)
    except Exception as e:
        output_lines = []
        self.send_stream(str(e), True)
    xcount = None
    if (not silent):
        if (not output_lines):
            return {'status': 'ok', 'execution_count': None, 'payload': [], 'user_expressions': {}}
        (data, stream) = self.process_output(output_lines)
        xcount = output_lines[(- 1)][0]
        if stream:
            stdout_content = {'name': 'stdout', 'text': stream}
            self.send_response(self.iopub_socket, 'stream', stdout_content)
        if data:
            execute_content = {'data': data, 'execution_count': xcount}
            self.send_response(self.iopub_socket, 'execute_result', execute_content)
    return {'status': 'ok', 'execution_count': xcount, 'payload': [], 'user_expressions': {}}
kernel entry point for the execution of each cell
def do_execute(self, code, silent, store_history=True, user_expressions=None, allow_stdin=False):
    ' \n        '
    try:
        output_lines = self.interp.execute(code)
    except Exception as e:
        output_lines = []
        self.send_stream(str(e), True)
    xcount = None
    if (not silent):
        if (not output_lines):
            return {'status': 'ok', 'execution_count': None, 'payload': [], 'user_expressions': {}}
        (data, stream) = self.process_output(output_lines)
        xcount = output_lines[(- 1)][0]
        if stream:
            stdout_content = {'name': 'stdout', 'text': stream}
            self.send_response(self.iopub_socket, 'stream', stdout_content)
        if data:
            execute_content = {'data': data, 'execution_count': xcount}
            self.send_response(self.iopub_socket, 'execute_result', execute_content)
    return {'status': 'ok', 'execution_count': xcount, 'payload': [], 'user_expressions': {}}