[IPython-dev] History

Robert Kern robert.kern at gmail.com
Fri Feb 18 17:10:40 EST 2011


[Please do not Cc me. I am on the list!]

On 2/18/11 3:50 PM, Thomas Kluyver wrote:
> On 18 February 2011 19:34, Robert Kern <robert.kern at gmail.com
> <mailto:robert.kern at gmail.com>> wrote:
>
>     I don't mean the actual objects, just whatever is given by the DisplayFormatter
>     system and the displayhook, i.e. whatever would get sent to a remote frontend.
>     I'm happy to have it be an extension functionality disabled by default, but I do
>     think that it should live in the same SQLite DB to get the references right.
>
> I don't have a problem with that, although my vote does go to having it disabled
> by default.

I vote the same way, too. :-)

> It's not altogether trivial, though, because we currently store the
> input before running it, so the output isn't available at the same time.

That's fine. It's necessarily a separate API although I do think that it should 
be part of the HistoryManager.

> Possible ways round that:
> - Keep output in a separate table, indexed in the same way as input. This is my
> preferred option, because it means the main history system doesn't need to be
> aware of the optional output history. There's a slightly greater chance of a
> mismatch between input and output, but the indexing is simple enough that it
> shouldn't be a problem.

This sounds fine. With (session, line) as the foreign key, it seems 
straightforward to keep it synchronous. The only suggestion I would make is to 
make the store_inputs() method (and a putative store_outputs() method) take the 
execution_count explicitly rather than taking it from the shell.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the IPython-dev mailing list