escribió:
Hello.. I'm trying to do a scripting for tracert in windows usingUse the subprocess module:
python...
I'm using popen(), but it displays only after the tracert is completed. i
want the results to be displayed for every route.
can anyone help me in this..
import subprocess
host = 'www.microsoft.com'
p = subprocess.Popen(["tracert", '-d', '-w', '100', host],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while True:
line = p.stdout.readline()
if not line: break
print '-->',line,
p.wait()
--
Gabriel Genellina