command history in the interpreter?

Moshe Zadka moshez at math.huji.ac.il
Sat May 20 12:25:43 EDT 2000


On Sat, 20 May 2000, alex k wrote:

> i had python1.52 in linux/mandrake7. when i pressed the uparrow at the
> console i could access the command history, so to speak. just like in
> bash.
> 
> now i use slackware7. i installed both python1.52 and python1.6 (the
> former replacing the latter). it didn't work in none of them.
> all of the arrowkeys type things like ^[[C  ^[[D and such.

Well, whoever built it did not do a good job -- so you'll have to. Get the
Python 1.5.2 sources (not 1.6 -- it's still alpha). Edit "Setup.in" to
include the readline library, and make sure you installed the slackware
package with the header files of "readline". Now, follow the good old
"./configure;make;make install" routine and you get a Python with command
line history in /usr/local

> the python interpreter in win98 (1.52 and 1.6) also don't give me the
> history function.

PythonWin is supposed to have a history function.

> it's so awkward now that i can't even edit the txt without deleting it
> (backspace).

Maybe "Del" works?

> is that feature hidden somewhere in the interpreter, or did mandrake
> somehow add it themselves?

Apparently, Mandrake are more competent at building Python from sources.
(Actually, it's probably Red Hat, and they use Python)


--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com





More information about the Python-list mailing list