Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Win32 ping

Thread Tools

Win32 ping

Sean Cody
Posts: n/a
Does anyone know of an ping module that will work with Windows?

I'm currently using os.popen("ping -n1 host") but it's terribly slow
when using it a few hundred times.

After enumerating my domain of machines I'm trying to ping them to
determine if they are active before connecting to them via WMI (which
takes forever to timeout).


Reply With Quote
Mike C. Fletcher
Posts: n/a
Sean Cody wrote:

> Does anyone know of an ping module that will work with Windows?

Jeremy Hylton's code works well on Windows. It's fairly straightforward
to code up an asynchronous loop to allow pinging a few hundred ip
addresses (using the ping module primarily to properly encode the
packets). I'm wondering, however, if you couldn't simply set the
timeout lower for the connections?


Mike C. Fletcher
Designer, VR Plumber, Coder

Reply With Quote
Christos TZOTZIOY Georgiou
Posts: n/a
On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
<(E-Mail Removed)> might have written:

>I tried that but it complains about not having os.fork() available.
>dir(os) does not contain fork.


You may try downloading this file:

Inside, there are the ping, icmp, inet and ip modules that (I believe) I
found in Jeremy Hylton's page; you can study their usage in the file (which is a quick-and-dirty rewrite of one of my first
Tkinter python programs, so I am not very proud of the state of the
code; just check the ping module use). Standard disclaimers apply.
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I do ping others and viceversa but, cannot ping myself jorgeantibes Wireless Networking 0 05-15-2009 11:37 AM
VRRP : I am unable to ping the virtual address, I can only ping thebackup addresses. ATM Cisco 2 11-13-2008 09:50 PM
Can Ping Switch but Can't Ping Rtr (behind it) Bob Simon Cisco 8 01-19-2005 05:31 PM
ping ping Why gruffydd Computer Support 3 12-29-2004 05:09 PM
Can not ping myself, but can ping others =?Utf-8?B?V0pQQw==?= Wireless Networking 6 12-26-2004 05:56 AM