up arrow with raw_input

kevin at exstor.com kevin at exstor.com
Sat Oct 26 02:57:34 CEST 2002

Hello All,

  I've been trying to trap an up-arrow response when using raw_input() and its
not going well. I've tried doing an ord() on the response to get the ASCII
value, but a string of length three is produced by the up-arrow event (^[OA)
rather than the single character that ord() expects. I've also tried using GNU
readline. This only works from the python prompt (>>>) and not while waiting
for input using raw_input().
  Does anyone have any ideas?


More information about the Python-list mailing list