By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

How to make command history persistent?

P: n/a
Hello,

My question is:
Is there an easy mean to make Python "command history"
persistent across interpreter invokations?

PS:
In the case the question above is not clear, I rephrase
it below verbosely...
When I work from the Python prompt, I enjoy features
like command line editing and searching/recalling
previous lines of code from the history.
(This is similar to working from a Unix shell prompt.)
But I would like, in addition, be able to keep the history
from one session to another (when I quit Python, the history
is lost, but I would like to retrieve it each time In
invoke again Python interactively).

Thanks

Oct 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

If using unix, you should have readline available.
See the tutotial appendix:-

http://www.python.org/doc/current/tut/node15.html

Regards, Paul Clinch

Oct 18 '05 #2

P: n/a
Great! The indicated "history save" works!
Thanks

Oct 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.