##// END OF EJS Templates
band-aid for completion...
band-aid for completion Unlike @Carreau's attempt at using proper CodeMirror completion, this is just a band-aid to get the existing completion back to working for 2.0. This adds a keypress handler on the completer, which then calls insert with the charCode of the key press event, replacing the final `elif` branch of the keydown handler. This cannot be done with keydown, since keydown doesn't know what character is incoming, only the hardware key that is struck.

File last commit:

r11009:e16cf2f8
r15322:c07938f3
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)