Sending ECHO_REQUEST (pinging) with python

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Tue Mar 27 06:07:51 EDT 2007


On Mon, 26 Mar 2007 16:50:09 +0200, Thomas Dybdahl Ahle <lobais at gmail.com> wrote:
> Den Mon, 26 Mar 2007 11:24:34 +0200 skrev Michal 'vorner' Vaner:
>> On Mon, Mar 26, 2007 at 08:30:16AM +0200, Thomas Dybdahl Ahle wrote:
>
>>> Do anybody know how to do this in python?
>
>> You need root for that and the ping command is allowed to have them by
>> suid bit. You can execute ping from inside python and use ping as is, if
>> you need.
>
> Yeah, I could execute ping, but it would lock me harder to the platform.

True; Linux ping and Solaris ping have incompatible flags and output.
I even believe several implementations are in use on Linux. Then add
Windows to the mix ...

-Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list