timer delays and kbhit() in Pythonwin?

Mark Hammond mhammond at skippinet.com.au
Sun Feb 17 06:12:26 EST 2002


Spencer Doidge wrote:
> The following script works fine running under Windows in the console, but it
> doesn't work right in Pythonwin.
> The point of this script is that while we are waiting 20 seconds for the
> 'hello' message to be printed, we can intervene with a keystroke and cause
> function doit() to terminate immediately.
> I suppose it doesn't work right in Pythonwin because kbhit() is only
> supported in the console. Is there a way to accomplish this same purpose
> running Pythonwin?

Not really - GUI programs are generally event driven.  You could display 
a dialog with a message and a cancel button.

Mark.




More information about the Python-list mailing list