473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to make command history persistent?

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
2 2270

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
Great! The indicated "history save" works!
Thanks

Oct 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
0
by: Herb Green | last post by:
We have just recently went from V7 to V8.1 fixpack 3. I do most of my work using the Command Center gui and use the "Log command in history file" option as an audit trail of the commands that I...
2
by: bwmiller16 | last post by:
Guys - Does the PRUNE logfile command do anything other than just do a simple delete of the files? Or is there more to it internally in DB2? Thanks in Advance, -B
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
0
by: namanhvu | last post by:
I've installed MySQL v4.1 onto my WinXP and unfortunately now need to reinstall my OS. I need to access my mysql command line history but don't know how. I know there's a .mysql_history file but...
6
by: John Grandy | last post by:
Does how to delete all of IE's browing history from the command line ? Same as Tools Internet Options Browsing History Delete Delete all... What I'd like is a .bat file.
38
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
1
by: flanker9876 | last post by:
Hello Everyone, I have Windows XP. I hope that someone can assist me with the command prompt. Does anyone know if the commands I enter into the command prompt are automatically saved to a...
12
by: raylopez99 | last post by:
I have an array that I wish to preserve as "read only". The array holds references to variables myObjects instantiated by new that change all the time. The variables are part of a class that I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.