[IPython-dev] Multiple outputs per input line

Thomas Kluyver takowl@gmail....
Mon Mar 21 13:28:34 CDT 2011


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.

Thomas

On 21 March 2011 17:50, Brian Granger <ellisonbg@gmail.com> wrote:

> I know Fernando is super busy with buying a hours this week, and he is
> most familiar with the input splitter logic, but did anyone figure out
> the regression that is triggering the display hook multiple times?
>
> Cheers,
>
> Brian
>
> On Mon, Mar 14, 2011 at 3:22 PM, Thomas Kluyver <takowl@gmail.com> wrote:
> > On 14 March 2011 18:44, Robert Kern <robert.kern@gmail.com> wrote:
> >>
> >> I'm not sure what you are doing here. Out/_oh should be storing the
> actual
> >> objects. The history should be storing the formatted text from the
> >> displayhook;
> >> you should not try to use repr() on those objects afterwards. That
> records
> >> the
> >> wrong thing.
> >
> > That should now be what it's doing. Specifically, in displayhook,
> > update_user_ns puts the actual object into Out[n] (and will update it on
> any
> > subsequent calls, so the final output is stored). log_output then puts
> the
> > text/plain representation of the object into a list of outputs, and when
> the
> > execution is complete, all the outputs are stored in the database.
> >
> > Thomas
> >
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev@scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> >
> >
>
>
>
> --
> Brian E. Granger, Ph.D.
> Assistant Professor of Physics
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu
> ellisonbg@gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20110321/6073b289/attachment.html 


More information about the IPython-dev mailing list