[IPython-dev] Multiple outputs per input line

Brian Granger ellisonbg at gmail.com
Mon Mar 21 14:38:36 EDT 2011


Thomas,

Can you open an issue for this regression so we can track it?

Thanks!

Brian

On Mon, Mar 21, 2011 at 11:32 AM, Fernando Perez
<Fernando.Perez at berkeley.edu> wrote:
> Hey guys,
>
> On Mon, Mar 21, 2011 at 11:28, Thomas Kluyver <takowl at gmail.com> wrote:
>> My best guess is that it's not actually a regression - I've seen code in
>> run_cell that ensures that only one block in a cell can fire displayhook,
>> which could be what has been described. But it doesn't affect the situation
>> in which that block causes displayhook to fire several times. As far as I
>> know, the only way to achieve that would be to catch things in displayhook,
>> append them to a list, and then display them only after computation has
>> finished.
>
> sorry, I can't look into this until tomorrow...
>
> Thomas, there should be code in there to prevent displayhook from
> firing based on the compilation mode: when code is compiled in
> 'single' mode, displayhook will fire, but if it's compiled in 'exec'
> mode, it won't.  There's actually different bytecode produced by
> python itself based on the mode flag.
>
> I thought I had made sure that for multiline blocks we always produced
> 'exec' mode, but something must have slipped through the cracks...
>
> Cheers,
>
> f
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com



More information about the IPython-dev mailing list