msvcrt.getch() from IDLE returns '\377'

Mark Hammond MarkH at ActiveState.com
Sun Oct 1 19:32:25 EDT 2000


"Georg Simon" <georg.simon at bnmsp.de> wrote in message
news:39D1DFE9.426A3972 at bnmsp.de...
> Windows 98
> sys.version '1.6 (#0, Sep  5 2000, 08:16:13) [MSC 32 bit (Intel)]'
>
> It seems to me that msvcrt.getch() does not work when called from
IDLE.

I would not expect it to.  getch() is designed for reading from a
"console".  IDLE has no such console, so characters have to be
obtained from the message queue - ie, you will need to use Tkinter
facilities to get at key-presses.

Mark.





More information about the Python-list mailing list