subprocess call is not waiting.

Terry Reedy tjreedy at udel.edu
Thu Sep 19 15:58:44 EDT 2013


On 9/19/2013 7:42 AM, harish.barvekar at 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




More information about the Python-list mailing list