##// END OF EJS Templates
Merge branch 'flush'
Thomas Kluyver -
r5420:cb0cd721 merge
parent child Browse files
Show More
@@ -762,6 +762,11 b' var IPython = (function (IPython) {'
762 762 // console.log(reply);
763 763 var msg_type = reply.header.msg_type;
764 764 var cell = this.cell_for_msg(reply.parent_header.msg_id);
765 if (!cell){
766 // message not from this notebook
767 console.log("Received IOPub message not caused by one of my cells");
768 return;
769 }
765 770 var output_types = ['stream','display_data','pyout','pyerr'];
766 771 if (output_types.indexOf(msg_type) >= 0) {
767 772 this.handle_output(cell, msg_type, content);
@@ -106,4 +106,9 b' class BaseFrontendMixin(object):'
106 106 from this frontend.
107 107 """
108 108 session = self._kernel_manager.session.session
109 return msg['parent_header']['session'] == session
109 parent = msg['parent_header']
110 if not parent:
111 # if the message has no parent, assume it is meant for all frontends
112 return True
113 else:
114 return parent.get('session') == session
@@ -19,6 +19,7 b' Authors'
19 19 # Imports
20 20 #-----------------------------------------------------------------------------
21 21
22 import sys
22 23 from io import BytesIO
23 24
24 25 from IPython.utils.decorators import flag_calls
@@ -317,6 +318,8 b' def pylab_activate(user_ns, gui=None, import_all=True, shell=None):'
317 318 print """
318 319 Welcome to pylab, a matplotlib-based Python environment [backend: %s].
319 320 For more information, type 'help(pylab)'.""" % backend
321 # flush stdout, just to be safe
322 sys.stdout.flush()
320 323
321 324 return gui
322 325
@@ -287,6 +287,10 b' class KernelApp(BaseIPythonApplication):'
287 287 self.write_connection_file()
288 288 self.init_io()
289 289 self.init_kernel()
290 # flush stdout/stderr, so that anything written to these streams during
291 # initialization do not get associated with the first execution request
292 sys.stdout.flush()
293 sys.stderr.flush()
290 294
291 295 def start(self):
292 296 self.heartbeat.start()
General Comments 0
You need to be logged in to leave comments. Login now