File: client.py

package info (click to toggle)
ipython 1.2.1-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 22,884 kB
  • sloc: python: 67,305; makefile: 469; lisp: 272; sh: 251
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)