[Tutor] msvcrt.getch()

Alan Gauld alan.gauld at blueyonder.co.uk
Tue Jul 20 23:50:35 CEST 2004


> >>> msvcrt.getch()
> '\xff'
>
> This means that when I try running the script described at the above
website,
> a space does squat, as demonstrated below:
>
> >>>

Thats because getch reads whats in the input immediately,
it doesn't wait until you type something.

So you have to put it inside a loop:

while True:
   inp = msvcrt.getch()
   if inp: break

Alan G.



More information about the Tutor mailing list