[IPython-dev] History

Thomas Kluyver takowl at gmail.com
Fri Feb 18 17:37:44 EST 2011


On 18 February 2011 22:10, Robert Kern <robert.kern at gmail.com> wrote:

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

Sorry. If I hit reply, it e-mails you directly (GMail's not so good at
mailing lists), so I'm in the habit of doing reply all. I thought the list
was smart enough to see your e-mail address and only send it once. I'll try
to remember to take other addresses out.


> 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.
>

OK, excellent. And yes, it's not a bad idea to take the execution_count/line
number explicitly. Done.

Coming back to Fernando's point about disk writes, I've implemented a very
simple cache (21 extra lines :) ). It can be turned on simply by setting
ip.history_manager.db_cache_size to the number of lines you want to store
before writing to disk. So, if you set it to 19, it will write on every 20th
command. For now, I've left the default at 0 - instant writes. And on exit,
any remaining cache is written, so you can set it to a very high value if
you want to minimise disk access.

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


More information about the IPython-dev mailing list