Python shell interpreting delete key as tilde?

Fredrik Lundh fredrik at pythonware.com
Sat Jan 21 09:15:17 CET 2006


Leif K-Brooks wrote:

> I'm running Python 2.3.5 and 2.4.1 under Debian Sarge. Instead of
> deleting the character after the cursor, pressing my "delete" key in an
> interactive Python window causes a system beep and inserts a tilde
> character.

that's probably because the delete key can be set up to send a "\e[3~"
sequence, and readline isn't properly configured to understand that.

> This behavior occurs across all of the terminals I've tried
> (xterm, Konsole, real Linux terminal), but does not occur when running
> bash instead of python. Other Readline-provided functionality (moving
> the cursor, history) seems to work fine.
>
> The delete key was working fine in Python up until a few days ago, and I
> don't remember making any changes that should have affected it.
>
> If anyone knows what could be causing this problem, please explain. It's
> driving me crazy!

this page might help:

    http://www.ibb.net/~anne/keyboard.html

or you could switch to a less lame operating system ;-) (duck).

</F>






More information about the Python-list mailing list