[IPython-dev] Multiple outputs per input line

Thomas Kluyver takowl at gmail.com
Mon Mar 14 18:22:51 EDT 2011

On 14 March 2011 18:44, Robert Kern <robert.kern at 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20110314/b6a9d605/attachment.html>

More information about the IPython-dev mailing list