I want to make a little tk app that continuous ping an ip and only show the MS, like, "10ms"
how could I do?
I want to make a little tk app that continuous ping an ip and only show the MS, like, "10ms"
how could I do?
If you want to use Windows ping
, you'll have to parse the output from the command line.
This is very specific, but should work:
import os
while(1):
ping = os.popen('ping www.google.com -n 1')
result = ping.readlines()
msLine = result[-1].strip()
print msLine.splot(' = ')[-1]