[IPython-user] c++-embedded ipython not preserving history (is in shadowhist only)

Václav Šmilauer eudoxos@arcig...
Wed Sep 24 03:38:08 CDT 2008

> Ipython saves the readline history in "atexit" handler
> (atexit_operations()). It was not run because the python interpreter
> was not destroyed (and atexit handler not run). If you are running
> from python code, atexit handler still gets run when the python
> process is ended.
I found out the cause for atexit handlers not being run: they are
normally run by Py_Finalize() which I had to comment out, since it
crashes with boost::python
> Perhaps you can try modding iplib.py by adding
> self.atexit_operations() in the end of interact() after while loop.
I added this (after IPShellEmbed call returns):

 import IPython.ipapi

and it works just fine.



More information about the IPython-user mailing list