[IPython-user] re set doesn't

David Warde-Farley dwf@cs.toronto....
Tue Dec 8 22:49:31 CST 2009


On 8-Dec-09, at 1:10 PM, Phillip M. Feldman wrote:

> Hello David,
>
> You've clarified a lot of things.  Thanks!
>
> By "history", I was referring to the arrow key buffer.  When I exit  
> by simply closing the IPython window, as opposed to doing quit(),  
> the history information usually not saved.  I'm not sure why this is.

Replying to the list with this. My guess is that the command history  
is written to disk when IPython is quit in the usual quit(), %exit,  
Ctrl+D, etc. and not if the Python interpreter is suddenly killed (as  
is the case if you simply shut the terminal window).

If you're running inside a terminal emulator and close the terminal  
without first exiting IPython, the interpreter is abruptly killed and  
IPython likely has no way of knowing that this has happened so that it  
can call cleanup code (such as writing history to disk). The IPython  
WX frontend likely does not have this problem, but I don't know how to  
get this working (try running "ipythonx"?). Perhaps someone else on  
the list can comment.

David


More information about the IPython-user mailing list