[Tutor] ping question...
Alan Gauld
alan.gauld at blueyonder.co.uk
Tue Dec 9 19:05:46 EST 2003
> My first stab was a simple x=os.system('ping -n 1
<ipaddress>'),
> unfortunately whether or not I run this line against a computer
with a
> request timed out response, x equals 0. Which helps me not at
all.
a zero return means it worked!
Try using os.popen() to read the results back.
> I'm looking over the socket class now to see if it'll provide
> anything that could be helpful,
You can do but remember that Ping doesn't work over TCP/IP
it uses a different protocol (ICMP from memory).
Alan G
More information about the Tutor
mailing list