##// END OF EJS Templates
add ZMQShell.set_parent...
MinRK -
Show More
@@ -374,17 +374,7 b' class Kernel(Configurable):'
374 __builtin__.input = input
374 __builtin__.input = input
375
375
376 # Set the parent message of the display hook and out streams.
376 # Set the parent message of the display hook and out streams.
377 shell.displayhook.set_parent(parent)
377 shell.set_parent(parent)
378 shell.display_pub.set_parent(parent)
379 shell.data_pub.set_parent(parent)
380 try:
381 sys.stdout.set_parent(parent)
382 except AttributeError:
383 pass
384 try:
385 sys.stderr.set_parent(parent)
386 except AttributeError:
387 pass
388
378
389 # Re-broadcast our input for the benefit of listening clients, and
379 # Re-broadcast our input for the benefit of listening clients, and
390 # start computing output
380 # start computing output
@@ -590,17 +580,7 b' class Kernel(Configurable):'
590
580
591 # Set the parent message of the display hook and out streams.
581 # Set the parent message of the display hook and out streams.
592 shell = self.shell
582 shell = self.shell
593 shell.displayhook.set_parent(parent)
583 shell.set_parent(parent)
594 shell.display_pub.set_parent(parent)
595 shell.data_pub.set_parent(parent)
596 try:
597 sys.stdout.set_parent(parent)
598 except AttributeError:
599 pass
600 try:
601 sys.stderr.set_parent(parent)
602 except AttributeError:
603 pass
604
584
605 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
585 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
606 # self.iopub_socket.send(pyin_msg)
586 # self.iopub_socket.send(pyin_msg)
@@ -587,6 +587,20 b' class ZMQInteractiveShell(InteractiveShell):'
587 )
587 )
588 self.payload_manager.write_payload(payload)
588 self.payload_manager.write_payload(payload)
589
589
590 def set_parent(self, parent):
591 """Set the parent header for associating output with its triggering input"""
592 self.displayhook.set_parent(parent)
593 self.display_pub.set_parent(parent)
594 self.data_pub.set_parent(parent)
595 try:
596 sys.stdout.set_parent(parent)
597 except AttributeError:
598 pass
599 try:
600 sys.stderr.set_parent(parent)
601 except AttributeError:
602 pass
603
590 #-------------------------------------------------------------------------
604 #-------------------------------------------------------------------------
591 # Things related to magics
605 # Things related to magics
592 #-------------------------------------------------------------------------
606 #-------------------------------------------------------------------------
General Comments 0
You need to be logged in to leave comments. Login now