Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to make command history persistent?

Reply
Thread Tools

How to make command history persistent?

 
 
vbfoobar@gmail.com
Guest
Posts: n/a
 
      10-18-2005
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

 
Reply With Quote
 
 
 
 
pclinch@internet-glue.co.uk
Guest
Posts: n/a
 
      10-18-2005

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

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

Regards, Paul Clinch

 
Reply With Quote
 
 
 
 
vbfoobar@gmail.com
Guest
Posts: n/a
 
      10-18-2005
Great! The indicated "history save" works!
Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Values entered in the Form disappears when using the history.go(-1) or history.back() sujith.bolar@gmail.com Javascript 2 10-17-2006 08:12 PM
Recover Firefox web search history with history set to 0 days Sudip Chakraborty Firefox 2 11-21-2005 06:47 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM
history.dat, formhistory.dat - deleting deletes history? S.Rodgers Firefox 4 05-05-2005 01:03 AM



Advertisments