Beginner Ping program

Linus Cohen linus at fixedstars.com.au
Sat Apr 28 01:54:07 EDT 2007


Hi all,
I'm a newbie to python and programming in general, so I wanted a
simple project to start off. What I'm trying to do here is write a
python command-line ping program, much like the Unix and Windows ping
programs. I've got this much worked out already:

class ping
    def PING(IP, pings, size):

and that's where I stop, because I realize I have no idea how to make
python send ICMP request packets. My previous project(an email reader
using poplib)used the stuff in section 18 of the modules
index(internet protocols) but I can't seem to find an equivalent for
ICMP packets. If anyone has help on this, I would really appreciate
it.

Cheers,
Linus




More information about the Python-list mailing list