File: inprocess.py

package info (click to toggle)
ipython 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,032 kB
  • ctags: 15,433
  • sloc: python: 73,792; makefile: 428; sh: 297
file content (40 lines) | stat: -rw-r--r-- 1,313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
""" 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'