##// END OF EJS Templates
Merge pull request #4504 from takluyver/inputtransformer-syntaxerror...
Merge pull request #4504 from takluyver/inputtransformer-syntaxerror Allow input transformers to raise SyntaxError, if they consider a line of input code invalid. The main motivating use case for this was Sage, this is a continuation of @vbraun's gh-4089. For background, see http://python.6.x6.nabble.com/Raising-a-SyntaxError-in-InputTransformer-td5027773.html. Also, took advantage of the opportunity to refactor and simplify `run_cell` a bit.

File last commit:

r11009:e16cf2f8
r14990:07072a49 merge
Show More
client.py
37 lines | 968 B | text/x-python | PythonLexer
""" 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)