Ben Last ben at
Mon Aug 16 13:38:20 CEST 2004

import readline will work on Windows:
a) if you're running the cygwin python, inside cygwin
b) if you've installed a readline module; there are at least two available.
Excuse me for the self-referential answer, but about half and hour before I
read this, I wrote a blog entry all about readline modules, with links to
and comments about the Windows ones.  The permalink is or it's the most recent
entry at

Karin: if you do import a readline, you can then use sys.stdin.readline() to
read a line of input, and you should get some sort of history functionality
(up-arrow, for example, will recall a previous line).


> -----Original Message-----
> From: at
> [ at]On Behalf Of
> P at
> Sent: 16 August 2004 11:52
> To: python-list at
> Subject: Re: replacement
> Karin Lagesen wrote:
> > I am writing a small write-logfile script for use on the
> terminal. I have here
> > a section where the user should be able to type in several
> lines. I have solved
> > it so far by using, which makes it possible to
> type in several
> > lines (separated by enter) and then terminate the session by
> typing ^D. This is
> > all very good. However, with this it is only possible to edit
> the line you are
> > in. If you spot an error further up in your text, you cannot
> get at it. Do any
> > of you know of a way I can do this?
> import readline
> (I don't know if it works on windos)
> Pádraig.
> --

More information about the Python-list mailing list