Show More
@@ -352,8 +352,14 b' class Kernel(Configurable):' | |||||
352 | # Set the parent message of the display hook and out streams. |
|
352 | # Set the parent message of the display hook and out streams. | |
353 | shell.displayhook.set_parent(parent) |
|
353 | shell.displayhook.set_parent(parent) | |
354 | shell.display_pub.set_parent(parent) |
|
354 | shell.display_pub.set_parent(parent) | |
355 | sys.stdout.set_parent(parent) |
|
355 | try: | |
356 |
sys.std |
|
356 | sys.stdout.set_parent(parent) | |
|
357 | except AttributeError: | |||
|
358 | pass | |||
|
359 | try: | |||
|
360 | sys.stderr.set_parent(parent) | |||
|
361 | except AttributeError: | |||
|
362 | pass | |||
357 |
|
363 | |||
358 | # Re-broadcast our input for the benefit of listening clients, and |
|
364 | # Re-broadcast our input for the benefit of listening clients, and | |
359 | # start computing output |
|
365 | # start computing output | |
@@ -532,13 +538,19 b' class Kernel(Configurable):' | |||||
532 | return |
|
538 | return | |
533 |
|
539 | |||
534 | self._publish_status(u'busy', parent) |
|
540 | self._publish_status(u'busy', parent) | |
535 |
|
541 | |||
536 | # Set the parent message of the display hook and out streams. |
|
542 | # Set the parent message of the display hook and out streams. | |
537 | shell = self.shell |
|
543 | shell = self.shell | |
538 | shell.displayhook.set_parent(parent) |
|
544 | shell.displayhook.set_parent(parent) | |
539 | shell.display_pub.set_parent(parent) |
|
545 | shell.display_pub.set_parent(parent) | |
540 | sys.stdout.set_parent(parent) |
|
546 | try: | |
541 |
sys.std |
|
547 | sys.stdout.set_parent(parent) | |
|
548 | except AttributeError: | |||
|
549 | pass | |||
|
550 | try: | |||
|
551 | sys.stderr.set_parent(parent) | |||
|
552 | except AttributeError: | |||
|
553 | pass | |||
542 |
|
554 | |||
543 | # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent) |
|
555 | # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent) | |
544 | # self.iopub_socket.send(pyin_msg) |
|
556 | # self.iopub_socket.send(pyin_msg) |
General Comments 0
You need to be logged in to leave comments.
Login now