Base class to manage the interaction with a running kernel
Bases: IPython.config.configurable.LoggingConfigurable, IPython.kernel.connect.ConnectionFileMixin
Communicates with a single kernel on any host via zmq channels.
There are four channels associated with each kernel:
The methods of the channels are exposed as methods of the client itself (KernelClient.execute, complete, history, etc.). See the channels themselves for documentation of these methods.
Are any of the channels created and running?
Get a message from the iopub channel
Get a message from the shell channel
Get a message from the stdin channel
Get the hb channel object for this kernel.
Get the iopub channel object for this kernel.
Is the kernel process still running?
Get the shell channel object for this kernel.
Starts the channels for this kernel.
This will create the channels if they do not exist and then start them (their activity runs in a thread). If port numbers of 0 are being used (random ports) then you must first call start_kernel(). If the channels have been stopped and you call this, RuntimeError will be raised.
Get the stdin channel object for this kernel.
Stops all the running channels for this kernel.
This stops their event loops and joins their threads.