[IPython-dev] messaging protocol

Jason Grout jason-sage at creativetrax.com
Mon Apr 11 06:17:42 EDT 2011


On 4/11/11 12:28 AM, Brian Granger wrote:
>   Any traffic (stdout, stderr, display hook) that is
> sent out over the PUB channel is send*immediately*.  This is required
> so that the users sees these things in real time as the code is
> executed, not after.

Remember that the use-case here is that only the last pyout output is 
displayed, so it seems perfectly reasonable for the displayhook to delay 
sending until after the cell is executed.  This is not the use-case 
where we want interactive pyout output from every command.

The one case where I see a possible problem is when you have something like:

a=1
a
print "done"

Then I suppose the pyout output would either be the pyout of a, or the 
pyout "None" (I don't know offhand which it would be).  If it was the 
pyout of a, then the pyout would be sent after the printed stdout 
output, which would seem weird.

Thanks,

Jason




More information about the IPython-dev mailing list