File: client.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 (37 lines) | stat: -rw-r--r-- 968 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
""" Defines a KernelClient that provides signals and slots.
"""

# Local imports
from IPython.utils.traitlets import Type
from IPython.kernel.channels import (
    ShellChannel, IOPubChannel, StdInChannel, HBChannel
)
from IPython.kernel import KernelClient

from .kernel_mixins import (
    QtShellChannelMixin, QtIOPubChannelMixin,
    QtStdInChannelMixin, QtHBChannelMixin,
    QtKernelClientMixin
)

class QtShellChannel(QtShellChannelMixin, ShellChannel):
    pass

class QtIOPubChannel(QtIOPubChannelMixin, IOPubChannel):
    pass

class QtStdInChannel(QtStdInChannelMixin, StdInChannel):
    pass

class QtHBChannel(QtHBChannelMixin, HBChannel):
    pass


class QtKernelClient(QtKernelClientMixin, KernelClient):
    """ A KernelClient that provides signals and slots.
    """

    iopub_channel_class = Type(QtIOPubChannel)
    shell_channel_class = Type(QtShellChannel)
    stdin_channel_class = Type(QtStdInChannel)
    hb_channel_class = Type(QtHBChannel)