Re: How to ping in Python?

2005-12-08 Thread Chris Miles
You could also try the ping module that the Eddie monitoring tool has been using successfully, cross-platform, for many years. http://dev.eddie-tool.net/trac/browser/eddie/trunk/lib/common/Directives/pinger.py Cheers, Chris Nico Grubert wrote: I could not find any ping Class or Handler in

Re: How to ping in Python?

2005-12-07 Thread Michael Schneider
I telnet to port 13 (returns time) Hope this is helpful, Mike Nico Grubert wrote: Hi there, I could not find any ping Class or Handler in python (2.3.5) to ping a machine. I just need to ping a machine to see if its answering. What's the best way to do it? Kind regards, Nico --

Re: How to ping in Python?

2005-12-07 Thread Laszlo Zsolt Nagy
Michael Schneider wrote: I telnet to port 13 (returns time) The problem is that most modern up-to-date servers use firewalls. They only open the ports that are absolutely necessary. Usually the time service is part of inetd, which is disabled by default, on most of the servers. PING ICMP may

Re: How to ping in Python?

2005-12-07 Thread Michael Schneider
Les, I only ping internal machines. You are right about shutting down ports. When we disable telent, we also disable ping. Many people may not though, good luck, Mike Laszlo Zsolt Nagy wrote: Michael Schneider wrote: I telnet to port 13 (returns time) The problem is that most modern

Re: How to ping in Python?

2005-12-07 Thread Sybren Stuvel
Nico Grubert enlightened us with: I just need to ping a machine to see if its answering. What's the best way to do it? To do a real ICMP ping, you need raw sockets, which are turned off on Windows and reserved for root on other systems. You could try to connect to an unused port, and see how

Re: How to ping in Python?

2005-12-07 Thread [EMAIL PROTECTED]
There is also always searching the Python Cookbook (http://pythoncookbook.activestate.com/) for something like this. There is already an ICMP library there (written by me and a friend) that includes a ping function that uses the library. -Brett --

How to ping in Python?

2005-12-05 Thread Nico Grubert
Hi there, I could not find any ping Class or Handler in python (2.3.5) to ping a machine. I just need to ping a machine to see if its answering. What's the best way to do it? Kind regards, Nico -- http://mail.python.org/mailman/listinfo/python-list

Re: How to ping in Python?

2005-12-05 Thread Peter Hansen
Nico Grubert wrote: I could not find any ping Class or Handler in python (2.3.5) to ping a machine. I just need to ping a machine to see if its answering. What's the best way to do it? Either use something like os.system() to call the ping executable, or try using Google (e.g. python ping

Re: How to ping in Python?

2005-12-05 Thread dudeman
Try the PyNMS libraries: http://freshmeat.net/projects/pynms/ It has a ping module. If all you need is the ping module, maybe you could just look through that code and see if it's relatively simple to impliment yourself. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to ping in Python?

2005-12-05 Thread dwelch
Nico Grubert wrote: Hi there, I could not find any ping Class or Handler in python (2.3.5) to ping a machine. I just need to ping a machine to see if its answering. What's the best way to do it? Kind regards, Nico # Derived from ping.c distributed in Linux's netkit. That code is #

Re: How to ping in Python?

2005-12-05 Thread Larry Bates
Seems that you must change the following lines to work: if prop.platform == 'darwin': myChecksum = socket.htons(myChecksum) 0x else: myChecksum = socket.htons(myChecksum) to if sys.platform == 'darwin': myChecksum = socket.htons(myChecksum) 0x