Python - Execute Process -> Block till it exits & Supress Output

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-04-01T16:20:25Z Indexed on 2010/04/01 16:23 UTC
Read the original article Hit count: 580

Filed under:
|

Hi,

I'm using the following to execute a process and hide its output from Python. It's in a loop though, and I need a way to block until the sub process has terminated before moving to the next iteration.

subprocess.Popen(["scanx", "--udp", host], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Thanks for any help.

© Stack Overflow or respective owner

Related posts about python

Related posts about subprocess