Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19649

Re: Killing threads, and os.system()

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 <moky.math@gmail.com>
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> (permalink)
References <jg867e$6n2$1@news.univ-fcomte.fr> <mailman.5249.1328025863.27778.python-list@python.org>
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 <mailman.5249.1328025863.27778.python-list@python.org>
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19649

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Killing threads, and os.system() Laurent Claessens <moky.math@gmail.com> - 2012-01-31 08:45 +0100
  Re: Killing threads, and os.system() Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-01-31 11:04 -0500
    Re: Killing threads, and os.system() Laurent Claessens <moky.math@gmail.com> - 2012-01-31 18:18 +0100
      Re: Killing threads, and os.system() Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-01-31 14:34 -0500
    Re: Killing threads, and os.system() Laurent Claessens <moky.math@gmail.com> - 2012-01-31 18:18 +0100
    Re: Killing threads, and os.system() John Nagle <nagle@animats.com> - 2012-02-03 00:14 -0800
      Re: Killing threads, and os.system() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-03 09:25 +0000
      Re: Killing threads, and os.system() Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-02-03 11:20 -0500
      Re: Killing threads, and os.system() Paul Rubin <no.email@nospam.invalid> - 2012-02-03 15:42 -0800

csiph-web