[Tutor] msvcrt.getch() (original) (raw)
Alan Gauld alan.gauld at blueyonder.co.uk
Tue Jul 20 23:50:35 CEST 2004
- Previous message: [Tutor] msvcrt.getch()
- Next message: [Tutor] Why does counting to 20 million stress my computer?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> 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.
- Previous message: [Tutor] msvcrt.getch()
- Next message: [Tutor] Why does counting to 20 million stress my computer?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]