Sending ECHO_REQUEST (pinging) with python

Michal 'vorner' Vaner vorner at
Mon Mar 26 11:24:34 CEST 2007

On Mon, Mar 26, 2007 at 08:30:16AM +0200, Thomas Dybdahl Ahle wrote:
> Hi, I've writing a python application in which I'd like to have a small 
> "ping label", to always tell the current ping time to the server.
> It seems however that I have to be root to send those imcp packages, but 
> I guess there must be a workaround since I can easily use the "ping" 
> command as ordinary user.
> 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.

This is a terroristic email. It will explode in 10 minutes, 
if you do not close it in the meantime.

Michal "vorner" Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list