[Tutor] ping question...

Slaybaugh Laura J IHMD SlaybaughLJ at ih.navy.mil
Tue Dec 9 10:28:53 EST 2003


Hello,

I'm still somewhat new to python, and I'm writing a program that
periodically pings several computers on my network to figure out whether
they're responding.

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.  

I tried downloading Jeremy Hyleton's ping implementation, but was unable to
unzip it (Winzip).  


I'm looking over the socket class now to see if it'll provide anything that
could be helpful, but I was curious is anyone here had any suggestions I
should look into.

Thanks,
Laura Slaybaugh	



More information about the Tutor mailing list