Terminating an embedded interpreter

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Mon Sep 12 06:00:08 EDT 2011


Hi!

I'm trying to provide some scripting capabilities to a program. For that, 
I'm embedding a Python interpreter, running a script in a separate thread to 
decouple it from the UI.

Now, how should I handle rogue scripts? For example, when a script hangs in 
an endless loop, how do I signal the Python interpreter to shut down? In 
other words, I want to trigger something like what Control-C does in a 
"normal" environment.

In case it matters, the OS here is MS Windows.

Thanks!

Uli

-- 
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list