BOOGIEMAN wrote:
On Fri, 11 Feb 2005 18:00:08 +0100, den wrote:
Did you try this:
import msvcrt
msvcrt.getch()
Yes, that's what I need. Thank you.
BTW, sometimes program continues
without me pressing any button, why ?
Probably because you had already hit a key earlier, and
it was still in the keyboard queue.
You can flush it first:
print prompt
while msvcrt.kbhit():
msvcrt.getch()
msvcrt.getch()
Pack that up in a subroutine and call it when
you need to pause and continue only when the user
has seen your prompt. Any previous keystrokes
will be discarded by the loop, then it will wait
for a new one to be hit.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list