how to move cursor in Interactive Interpreter

Peter Otten __peter__ at web.de
Tue Aug 14 02:44:10 EDT 2007


 yan.python at gmail.com wrote:

> i  have a question.
> when i run Interactive Interpreter in linux command promt,how can i
> move the cursor.
> for example,when i enter a string,i often enter the quotation mark ""
> first,and the move the cursor inside the mark to enter the string,in
> windows,it is ok.but when i do that in linux,pressing the "left" key
> will just print "^[[D" in the screen ,but not what i want.
> so , how can i move the cursor Interactive Interpreter in linux?
>  i've googled and find nothing useful.who i tell me what to do?

Python uses GNU readline for cursor movements. The Python version that ships
with your distribution should work out of the box. If you compile Python
yourself make sure that the development package (not just the binary) is
installed. For Suse this is readline-devel.

Peter



More information about the Python-list mailing list