Interrupt Python C API

Tim Roberts timr at
Wed Apr 15 08:39:53 CEST 2009

googler.1.webmaster at wrote:
>I just have a design problem and don't know how to solve it. I call a
>function which
>executes a simple "PyRun_String(...)" command.
>imagine the script while 1: pass is executed so the app would hang. Is
>there any chance to break out this PyRun_String-function?

How would you know that it was an infinite loop, rather than just a
long-running script?  Alan Turing taught us that you can't tell whether an
arbitrary script will terminate.
Tim Roberts, timr at
Providenza & Boekelheide, Inc.

More information about the Python-list mailing list