Click to See Complete Forum and Search --> : Getting rid of ^H and ^[[D, etc.


George Kilroy
12-09-2001, 07:34 PM
With Python I've been using raw_input to get input from the user. Unfortunatly backspace yields a "^H" and the arrow keys also spit out gibberish. Is there a way I can make it so that this garbage doesn't show up?

vee-eye
12-09-2001, 08:45 PM
I'm not sure, but it was doing this with cat and I figured out that if you hold the shift key down and press your key (ie. backspace), that sort of rubbish won't appear.

George Kilroy
12-09-2001, 10:24 PM
Ctrl-backspace seems to allow backspace to work within Python. Is it common for Linux computers to do this? I'd really like for the program to work without it, because someone who is using my program isn't going to know to type ctrl+backspace. I tried a google search, but it ignores the "^" symbols so that wasn't any help.