##// END OF EJS Templates
add parent to Configurable...
add parent to Configurable this adds the notion of a parent and member config, so the config: c.Foo.Bar.attr = value will only set `Bar.attr = value` for `Bar` instances which are members of `Foo` instances. The mechanism for doing this is ```python f = Foo(config=cfg) f.b = Bar(parent=f) ``` This Instance config has higher priority than plain class config for Bar, but still lower priority than direct keyword arg trait assignment. The main implication this has is to change the standard creation of descendants: ```python self.bar = Bar(config=self.config) ``` into a direct parent expression ```python self.bar = Bar(parent=self) ``` This also means that most Configurables will actually have a handle on their parent object.

File last commit:

r11009:e16cf2f8
r11062:7f44a560
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)