Beginner Ping program

2007-04-27 Thread Linus Cohen
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

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Beginner Ping program

2007-04-28 Thread Linus Cohen
Actually the class ping bit is a placeholder. I'm actually developing
a module with python implementations of most standard network/internet
tools such as telnet, tracert, whois etc. It will be called inettools,
and the ping function is what I'm working on first. It should be a
simple enough job to code in the features the Unix and DOS ping
programs have(never stop, change size, change timeout).
As I am typing this, I'm looking through ping.c to see what I can
glean. It probably won't be much. My experience with C is very little.
As in, microscopic. Pretty much all the coding I've done up till now
has been shell scripting.

Cheers,
Linus



-- 
http://mail.python.org/mailman/listinfo/python-list