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

jepler epler jepler.lnk at lnk.ispi.net
Mon Oct 2 08:41:57 EDT 2000


On Sun, 01 Oct 2000 23:32:25 GMT, Mark Hammond
 <MarkH at ActiveState.com> wrote:
>
>"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.

Shouldn't it raise an exception in this case?

Jeff



More information about the Python-list mailing list