ping with python
Matthew Dixon Cowles
matt at mondoinfo.com
Mon Nov 5 14:16:35 EST 2001
On Mon, 05 Nov 2001 17:24:29 GMT, Paul Pfaff <paul.pfaff at valorec.com>
wrote:
>Hello,
Hi!
> I'm looking to write a simple Ping tool in Python 2.1.1 to log
> response time xx ms.
> Python is new for me and I find it really interesting. For the
> moment I have buy following good books :
> - Programming Python (Mark Lutz, O'Reilly)
> - Learning Python (Mark Lutz, David Ascher, O'Reilly)
>
> But, can you help me please :
> 1. I need the reference of a beginner book how explain the basic
> functions, or if possible a URL.
There are some good introductions and other things linked from:
http://www.python.org/doc/Newbies.html
Much of that is geared toward folks who aren't programmers. There are
other links as well at:
http://www.python.org/doc/Intros.html
> 2. Can you tell me if an IP library is available ? (commands : ping,
> tracert....)
There's the socket module which will allow you to write your own
programs that use sockets. Jeremy Hylton implemented ping and
traceroute:
http://www.python.org/~jeremy/python.html
and I implemented ping:
ftp://ftp.visi.com/users/mdc/ping.py
But from the way you spell tracert, I expect that you're using Windows.
Those programs are likely to run under NT but not under 95/98/ME. I
don't know about 2000.
Regards,
Matt
More information about the Python-list
mailing list