Peter Otten wrote:
The following works on my linux system:import subprocess p = subprocess.Popen( ["ping", "google.com"], stdout=subprocess.PIPE) instream = iter(p.stdout.readline, "") for line in instream: print line.rstrip() I don't have Windows available to test, but if it works there, too, the problem is the internal buffer used by Python's implementation of file iteration rather than the OS.
Excellent, that works on Windows as well. That conclusively proves that the buffering problem is in Python, not in the command that is executed. (Although that may happen, too, for some commends.)
Regards, Gertjan. -- http://mail.python.org/mailman/listinfo/python-list
