sys.stdin.read() replacement

P at draigBrady.com P at draigBrady.com
Mon Aug 16 12:51:47 CEST 2004


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 sys.stdin.read(), 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