Problems with raw_input

Michael Hudson mwh21 at
Wed Mar 15 12:49:27 CET 2000

dogboy777 at writes:

> I just started using the raw_input function and I'm running into a
> problem. I'm running the script on a Linux box via telnet from Win95.
> When I've telnetted in, my backspace key, etc. work just fine for shell
> commands. But when I run a python script that uses raw_input, it turns
> backspaces to ^H, and doesn't even do them properly. For ex, when I
> type:
> up^H^Hload
> it returns a string that looks like "load", but when I compare it to
> "load" it says it isn't the same. However, if I type in "load" w/o any
> backspacing, it works just fine. Any idea what the problem is and how I
> can correct it?

At a guess the string in Python *is* "up^H^Hload", so when it prints
it prints "up", backspaces over them and prints "load".

Try fiddling with the settings of the telnet program, the value of
$TERM environment variable or getting a proper telnet proggie (putty
is good).  The telnet program that comes with windows is one of the
worst programs I have ever encountered that I have to use on a regular

Not a python problem, anyway.

*how*-many-messages-today?-ly y'rs

very few people approach me in real life and insist on proving they are
drooling idiots.                         -- Erik Naggum, comp.lang.lisp

More information about the Python-list mailing list