[Tutor] How to use getch()?
rdm at rcblue.com
Mon Aug 28 01:07:42 CEST 2006
Alan Gauld has also been trying to help me by direct email. But his suggested
c = 0
c += 1
if msvcrt.getch() == 'k':
didn't work for me either. I was just about to tell him so, when I
remembered to try to run it not using IDLE, i.e., by just clicking on
the script icon (to use the console--is that the term?) I knew I'd
have to add a line something like
raw_input("\n\nPress the enter key to exit.")
and when I did the script ran just as I'd hoped!
My thanks to Kent and Alan.
More information about the Tutor