[IPython-user] c++-embedded ipython not preserving history (is in shadowhist only)
Tue Sep 23 14:47:05 CDT 2008
I have ipython embedded in c++ code, via PyRun_SimpleFile that runs
(reduced) something like:
from IPython.Shell import IPShellEmbed
sys.argv=['<embedded python interpreter>']
ipshell = IPShellEmbed(,exit_msg='Bye.')
Once ipshell() returns (^D), pyRun_SimpleFile returns as well and the
whole program terminates.
Next time I run, history from the previous session doesn's show up,
although grepping through ~/.ipython/db/shadowhist/* shows that those
commands were actually saved there, but not in ~/.ipython/history.
If I run ipython unembedded, or embedded from pure python code, history
is saved and behaves as expected.
I would file a bug at launchpad on that, but I am still not sure whether
I didn't miss anything. Searching google and ipython docs releaved
nothing significant, seemed to me.
Thanks a lot, Václav Šmilauer
More information about the IPython-user