[IPython-dev] Multiple outputs per input line
Sun Mar 13 11:26:04 CDT 2011
I realised that it's possible to get multiple outputs from a single input
line. Most trivially, you can do "for a in range(5): a", to produce 5
outputs. At present, this crashes my sqlite-history branch if output logging
is enabled, because it expects each output item to have a unique session and
line number. In fact, the session output history doesn't really expect it
either: it only stores the last result.
It should be simple enough to catch the error in writing to the database,
and only store the first result, or to use an SQL update statement so we
only store the last result. Is that good enough for what I think is a fairly
unusual case? Or do we want to work out a way of storing all the outputs
from a command? Robert, logging output to the database was your suggestion,
so perhaps you've got an opinion?
(Of course, I can relax the restriction that session and line number must
together be unique, but then getting useful information from the database
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev