Python program stopping execution wating for keypress

Fredrik Lundh fredrik at pythonware.com
Wed Feb 21 13:33:41 EST 2001


Syver Enstad wrote:
> Some times the programs just stop in the middle of the execution,
> essentially sleeping as they use no processor time. The times I've observed
> this is on applications running in a console, so I tried pressing a key and
> then the application starts executing again. Sometimes needing more than one
> key press per run to keep it going.
>
> Have anyone witnessed this behaviour, I would be glad to know.

does the program print stuff to the console, and stop at
a print statement?

do you have "quick edit" (or whatever it's called in your
version of windows) enabled?

did you click in the window?

(this switches the console to "selection mode", and blocks
output until you press a key or click the right button.  the
titlebar also changes in this mode)

Cheers /F





More information about the Python-list mailing list