Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'suppose': 0.07; 'pid,': 0.09; 'thread,': 0.09; 'cc:addr:python-list': 0.10; 'subject:not': 0.11; 'proc': 0.16; 'wait.': 0.16; 'pfxlen:0': 0.17; 'cc:2**0': 0.23; 'this:': 0.23; "i've": 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'running': 0.32; 'received:google.com': 0.34; 'problem,': 0.35; 'process,': 0.35; 'similar': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'created': 0.36; 'but': 0.36; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'easy': 0.60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=I7bhETolhq5RqhSQ811P8kAyO+yprWCJDFPduxvdjU4=; b=PfVOIvSLuDSaq1fOmwjsA3Jr8Xw6+hwPBRYKBdayuFcYhm3uz9K6K96Y2SLipLHsAl jp8ujfflQkv0fGYl/gyzr+sgqe0Blc6QahClQKXsJqxF9P7nPggP0gU3DFqx/4wk81uX 6XB9LkHjoh+Es14LsDCJp2gsXHQyRgsh/vxnC2spmx3G9GEBUUvSi30Fb8M3E24Md/Zt 7/Bgo88HqxeJOqtv7FwqCwdBarAZYH1JJGTgY2KSY4tozS82Z+zNmuKnPmMtFBJiatPI xsvBuW64zijRG0U+7ffWXMpbip6rBASxM+yXCEMXYpKt/aHgVuzlyQnTK2pslELAQXLl DyqQ== MIME-Version: 1.0 In-Reply-To: <0405db16-6a4c-4189-a32c-2311d45eead3@googlegroups.com> References: <0b598d7f-7137-47cc-8eed-80ab450536c5@googlegroups.com> <0405db16-6a4c-4189-a32c-2311d45eead3@googlegroups.com> Date: Tue, 18 Sep 2012 14:54:41 +0100 Subject: Re: subprocess call is not waiting. From: andrea crotti To: paulstaten@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347976484 news.xs4all.nl 6888 [2001:888:2000:d::a6]:37987 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29431 I have a similar problem, something which I've never quite understood about subprocess... Suppose I do this: proc = subprocess.Popen(['ls', '-lR'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) now I created a process, which has a PID, but it's not running apparently... It only seems to run when I actually do the wait. I don't want to make it waiting, so an easy solution is just to use a thread, but is there a way with subprocess?