On Tue, 11 Jun 2013 01:50:07 +0000, Joseph L. Casale wrote:

> I am using Popen to run the exe with communicate() and I have sent stdout
> to PIPE without luck. Just not sure what is the proper way to iterate over
> the stdout as it eventually makes its way from the buffer.

The proper way is:

        p = subprocess.Popen(..., stdout=subprocess.PIPE)
        for line in p.stdout:
            # use 'line'
        p.wait()

If the program uses stdin, matters get more complicated.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to