Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'that?': 0.05; 'method.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'returns,': 0.09; 'runs': 0.10; 'jan': 0.12; 'blocking': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'function': 0.29; 'am,': 0.29; 'raise': 0.29; 'returned': 0.30; 'should': 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'email addr:gmail.com': 0.63; 'hardly': 0.84; 'received:fios.verizon.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: subprocess call is not waiting. Date: Thu, 19 Sep 2013 15:58:44 -0400 References: <0b598d7f-7137-47cc-8eed-80ab450536c5@googlegroups.com> <0405db16-6a4c-4189-a32c-2311d45eead3@googlegroups.com> <28ih585cvob222k24v7ccfapgvav7nfgur@invalid.netcom.com> <5059c765$0$6952$e4fe514c@news2.news.xs4all.nl> <505a018f$0$6946$e4fe514c@news2.news.xs4all.nl> <6886842d-e89c-4ced-8502-fdaa250d1ac5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <6886842d-e89c-4ced-8502-fdaa250d1ac5@googlegroups.com> 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379620749 news.xs4all.nl 15895 [2001:888:2000:d::a6]:58630 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54443 On 9/19/2013 7:42 AM, harish.barvekar@gmail.com wrote: > subprocess.call(tempFileName, shell=True).communicate() should raise an AttributeError as the int returned by subprocess.call does not have a .communicate method. > this process is not blocking. Why do you think that? All function calls block until the function returns, at which point blocking ceases. If you call Popen(someprog).communicate() and someprog runs quickly, you will hardly notice the blocking time. -- Terry Jan Reedy