-
Notifications
You must be signed in to change notification settings - Fork 14
Description
A kernel for Pascal is essential.
python pascal console attach example
with GetDOSOutput und AttachConsole is just the first step.
The kernel and client live in different processes. They communicate via messaging protocols implemented on top of network sockets. Currently, these messages are encoded in JSON, a structured, text-based document format.
Our kernel receives code from the client (the notebook, for example). The do_execute() function is called whenever the user sends a cell's code.
The kernel can send messages back to the client with the self.send_response() method:
The first argument is the socket, here, the IOPub socket
The second argument is the message type, here, stream, to send back standard output or a standard error, or display_data to send back rich data
The third argument is the contents of the message, represented as a Python dictionary
The data can contain multiple MIME representations: text, HTML, SVG, images, and others. It is up to the client to handle these data types. In particular, the Notebook client knows how to represent all these types in the browser.