By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,677 Members | 1,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,677 IT Pros & Developers. It's quick & easy.

Win32 ping

P: 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).

--
Sean

Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: 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?

HTH,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/


Jul 18 '05 #2

P: n/a
On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
<nu*********************@tfh.ca> might have written:
I tried that but it complains about not having os.fork() available.
dir(os) does not contain fork.


Huh?

You may try downloading this file:

http://www.sil-tec.gr/~tzot/python/wiping.tgz

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
wiping.py 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.
Jul 18 '05 #3

P: n/a
On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
<nu*********************@tfh.ca> might have written:
I tried that but it complains about not having os.fork() available.
dir(os) does not contain fork.


Huh?

You may try downloading this file:

http://www.sil-tec.gr/~tzot/python/wiping.tgz

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
wiping.py 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.
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.