##// END OF EJS Templates
Make comm manager (mostly) independent of InteractiveShell...
Make comm manager (mostly) independent of InteractiveShell This makes it possible to use comms from wrapper kernels, without instantiating the full IPython shell machinery. The one remaining place where we need a reference to shell is to fire pre_execute and post_execute hooks (which are needed to get mpl figures right). This is a pure IPythonism, that it should be safe to ignore if shell is not set.

File last commit:

r11009:e16cf2f8
r17964:a59dfd02
Show More
inprocess.py
40 lines | 1.3 KiB | text/x-python | PythonLexer
""" Defines an in-process KernelManager with signals and slots.
"""
# Local imports.
from IPython.kernel.inprocess import (
InProcessShellChannel, InProcessIOPubChannel, InProcessStdInChannel,
InProcessHBChannel, InProcessKernelClient, InProcessKernelManager,
)
from IPython.utils.traitlets import Type
from .kernel_mixins import (
QtShellChannelMixin, QtIOPubChannelMixin,
QtStdInChannelMixin, QtHBChannelMixin, QtKernelClientMixin,
QtKernelManagerMixin,
)
class QtInProcessShellChannel(QtShellChannelMixin, InProcessShellChannel):
pass
class QtInProcessIOPubChannel(QtIOPubChannelMixin, InProcessIOPubChannel):
pass
class QtInProcessStdInChannel(QtStdInChannelMixin, InProcessStdInChannel):
pass
class QtInProcessHBChannel(QtHBChannelMixin, InProcessHBChannel):
pass
class QtInProcessKernelClient(QtKernelClientMixin, InProcessKernelClient):
""" An in-process KernelManager with signals and slots.
"""
iopub_channel_class = Type(QtInProcessIOPubChannel)
shell_channel_class = Type(QtInProcessShellChannel)
stdin_channel_class = Type(QtInProcessStdInChannel)
hb_channel_class = Type(QtInProcessHBChannel)
class QtInProcessKernelManager(QtKernelManagerMixin, InProcessKernelManager):
client_class = __module__ + '.QtInProcessKernelClient'