Killing threads, and os.system()

Laurent Claessens moky.math at
Tue Jan 31 12:18:28 EST 2012

Le 31/01/2012 17:04, Dennis Lee Bieber a écrit :

> 	Of course, if that thread is stuck waiting for a call to os.system()
> to complete, then it can not do anything...
> 	os.system()	is a rather limited, restrictive, call -- best used for
> quick one-of operations. If running Python 2.6+, I'd recommend
> converting from os.system() to subprocess.Popen(). .Popen() objects now
> have .terminate() and .kill() methods.

Ok, I'll try that Popen. Indeed I think that my threads are stuck 
waiting os.system to complete.


More information about the Python-list mailing list