[IPython-dev] Fwd: [SciTech] ActivePapers Python edition
Zoltán Vörös
zvoros at gmail.com
Mon Dec 9 10:03:45 EST 2013
You could also look at the python interface ipython-get-history.py at
https://github.com/ipython/ipython/blob/master/examples/core/ipython-get-history.py
Cheers,
Zoltán
On 09/12/13 15:59, Matthias BUSSONNIER wrote:
> Le 9 déc. 2013 à 14:28, Konrad Hinsen a écrit :
>
>> Thomas Kluyver writes:
>>
>>> However, you can easily enough tell whether the current notebook
>>> has been run through once with no editing, by comparing the list of
>>> code cells to the history.
>> That looks good enough for my purposes. Could you give me a pointer
>> to how I can access the kernel's history information for doing
>> such a comparison?
> the history sqlite file (.ipython/profile_default/history.sqlite)
> contains lots of info like raw input entered by user.
>
> you are probably interessed in session and history and join the two:
>
> sqlite> .schema history
> CREATE TABLE history
> (session integer, line integer, source text, source_raw text,
> PRIMARY KEY (session, line));
>
> sqlite> .schema sessions
> CREATE TABLE sessions (session integer
> primary key autoincrement, start timestamp,
> end timestamp, num_cmds integer, remark text);
>
> I see here that only sessions have timestamp, should we add timestamp to history ?
> --
> M
>
>
More information about the IPython-dev
mailing list