[IPython-User] Logging in new IPython
Wed Aug 3 16:16:12 CDT 2011
I tend to log my sessions and index them via full-text searching tool called
"recoll" along with many other files (indeed tons of them). Being able to
have IPython history in the form of text would make my life easier since
recoll can easily crawl text files. In addition, recoll has a command line
tool to dump xapian database into a text file with some basic text
statistics options. This way, I can easily get statistics about my most used
Python commands and such.
I plan to upgrade my beloved IPython v0.10 to the new release tonight. I
will let you know how my experience goes with the new one. Hopefully, I will
figure out a way to get text outputs from the sqlite saved logs.
On Wed, Aug 3, 2011 at 9:30 AM, Thomas Kluyver <firstname.lastname@example.org> wrote:
> On 3 August 2011 16:02, Gökhan Sever <email@example.com> wrote:
>> Thanks for the answer Thomas. Is there a way to dump the sqlite database
>> to a text file? Since time-stamping automatically added in the database, I
>> don't see a particular reason for using another logging mechanism.
> There's no tool for that at present, but if you feel like writing one, it
> shouldn't be too complex. The file is
> .ipython/profile_default/history.sqlite. You can extract timestamps from the
> session table, and then use the session number to select rows from the
> history table (and the output_history table if you've turned on output
> logging as well). In fact, you might be able to import IPython.core.history
> to handle loading the database.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User