Show More
@@ -270,6 +270,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
270 | 270 | display_formatter = Instance(DisplayFormatter) |
|
271 | 271 | displayhook_class = Type(DisplayHook) |
|
272 | 272 | display_pub_class = Type(DisplayPublisher) |
|
273 | data_pub_class = None | |
|
273 | 274 | |
|
274 | 275 | exit_now = CBool(False) |
|
275 | 276 | exiter = Instance(ExitAutocall) |
@@ -483,6 +484,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
483 | 484 | self.init_prompts() |
|
484 | 485 | self.init_display_formatter() |
|
485 | 486 | self.init_display_pub() |
|
487 | self.init_data_pub() | |
|
486 | 488 | self.init_displayhook() |
|
487 | 489 | self.init_reload_doctest() |
|
488 | 490 | self.init_latextool() |
@@ -659,6 +661,13 b' class InteractiveShell(SingletonConfigurable):' | |||
|
659 | 661 | self.display_pub = self.display_pub_class(config=self.config) |
|
660 | 662 | self.configurables.append(self.display_pub) |
|
661 | 663 | |
|
664 | def init_data_pub(self): | |
|
665 | if not self.data_pub_class: | |
|
666 | self.data_pub = None | |
|
667 | return | |
|
668 | self.data_pub = self.data_pub_class(config=self.config) | |
|
669 | self.configurables.append(self.data_pub) | |
|
670 | ||
|
662 | 671 | def init_displayhook(self): |
|
663 | 672 | # Initialize displayhook, set in/out prompts and printing system |
|
664 | 673 | self.displayhook = self.displayhook_class( |
@@ -147,6 +147,8 b' class Kernel(Configurable):' | |||
|
147 | 147 | self.shell.displayhook.topic = self._topic('pyout') |
|
148 | 148 | self.shell.display_pub.session = self.session |
|
149 | 149 | self.shell.display_pub.pub_socket = self.iopub_socket |
|
150 | self.shell.data_pub.session = self.session | |
|
151 | self.shell.data_pub.pub_socket = self.iopub_socket | |
|
150 | 152 | |
|
151 | 153 | # TMP - hack while developing |
|
152 | 154 | self.shell._reply_content = None |
@@ -353,6 +355,7 b' class Kernel(Configurable):' | |||
|
353 | 355 | # Set the parent message of the display hook and out streams. |
|
354 | 356 | shell.displayhook.set_parent(parent) |
|
355 | 357 | shell.display_pub.set_parent(parent) |
|
358 | shell.data_pub.set_parent(parent) | |
|
356 | 359 | sys.stdout.set_parent(parent) |
|
357 | 360 | sys.stderr.set_parent(parent) |
|
358 | 361 | |
@@ -538,6 +541,7 b' class Kernel(Configurable):' | |||
|
538 | 541 | shell = self.shell |
|
539 | 542 | shell.displayhook.set_parent(parent) |
|
540 | 543 | shell.display_pub.set_parent(parent) |
|
544 | shell.data_pub.set_parent(parent) | |
|
541 | 545 | sys.stdout.set_parent(parent) |
|
542 | 546 | sys.stderr.set_parent(parent) |
|
543 | 547 |
@@ -44,6 +44,7 b' from IPython.utils import py3compat' | |||
|
44 | 44 | from IPython.utils.traitlets import Instance, Type, Dict, CBool, CBytes |
|
45 | 45 | from IPython.utils.warn import warn, error |
|
46 | 46 | from IPython.zmq.displayhook import ZMQShellDisplayHook |
|
47 | from IPython.zmq.datapub import ZMQDataPublisher | |
|
47 | 48 | from IPython.zmq.session import extract_header |
|
48 | 49 | from session import Session |
|
49 | 50 | |
@@ -464,6 +465,7 b' class ZMQInteractiveShell(InteractiveShell):' | |||
|
464 | 465 | |
|
465 | 466 | displayhook_class = Type(ZMQShellDisplayHook) |
|
466 | 467 | display_pub_class = Type(ZMQDisplayPublisher) |
|
468 | data_pub_class = Type(ZMQDataPublisher) | |
|
467 | 469 | |
|
468 | 470 | # Override the traitlet in the parent class, because there's no point using |
|
469 | 471 | # readline for the kernel. Can be removed when the readline code is moved |
General Comments 0
You need to be logged in to leave comments.
Login now