msvcrt.getch() overly receptive in idle?

Chris Tavares ctavares at develop.com
Tue Jun 12 18:55:31 EDT 2001


"Frank Miles" <fpm at u.washington.edu> wrote in message
news:9g5m7k$gu8$1 at nntp6.u.washington.edu...
> I'm trying to get getch() working in Windows (Python 2.0).  It seems to
> work fine outside of Idle, but inside Idle it immediately returns a
> character with the value 255.
>
> Can anyone point me to the obvious solution?  Thanks!
>
> -frank

There isn't an obvious solution, but there is an explanation:

msvcrt.getch() works with a windows console. Idle doesn't run in a console,
so getch() won't work there.

-Chris






More information about the Python-list mailing list