Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!news.le-studio75.com!news.univ-fcomte.fr!not-for-mail From: Laurent Claessens Newsgroups: comp.lang.python Subject: Re: Killing threads, and os.system() Date: Tue, 31 Jan 2012 18:18:28 +0100 Organization: A poorly-installed InterNetNews site Lines: 16 Message-ID: <4F282264.5030005@gmail.com> References: NNTP-Posting-Host: soleil.univ-fcomte.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.univ-fcomte.fr 1328030303 8711 194.57.84.1 (31 Jan 2012 17:18:23 GMT) X-Complaints-To: news@news.univ-fcomte.fr NNTP-Posting-Date: Tue, 31 Jan 2012 17:18:23 +0000 (UTC) Cc: python-list@python.org User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19649 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. Thanks Laurent