ping with python?

Michael Muller mmuller at enduden.com
Thu Feb 6 18:17:58 EST 2003


In article <mailman.1044380290.15748.python-list at python.org>, "Rupert
Kolb" <rupert.kolb at med.uni-tuebingen.de> wrote:


> Hi,
> I have to write a tool, which needs (among other things) to ping some
> hosts.
> The "ping" should work at linux, solaris and windows (i.e. to be
> plattform independant).
> In former times I usually used net::ping ;-)  Is there a plattform
> independant "ping" in python?  Rupert Kolb
> 

I've always called the ping command from os.popen().  If there is a
python ping module out there, I'm not aware of it.  A quick search of
parnassus doesn't reveal one.

I believe that in order to implement "ping" you need to be able to work with raw
packets, which is only possible when running as root (the ping command is
suid root on all of my systems).




More information about the Python-list mailing list