How to test whether a host is reachable?

Diez B. Roggisch deets at nospam.web.de
Thu Feb 22 10:08:29 EST 2007


> Just because you could ping with ICMP packets doesn't mean you could
> do anything with the machine.  I assume that you are connecting to
> do something on the machine.  Just wrap what you are trying to do
> in try: block.  It will either succeed or fail.  Handle the exeption.

And the other way round: just because you can't ping a machine doesn't mean
you can't do anything with it - a Firewall might just have snipped away all
the ICMP-packets.

Diez



More information about the Python-list mailing list