On 2018-04-15 12:01, Ho Yeung Lee wrote:
while 1:
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()


after running over 1 hour, it stop and not return in one of tracert

how to set timeout and know that this is timeout?

Try using the 'subprocess' module instead.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to