Win32 ping

Discussion in 'Python' started by Sean Cody, Aug 22, 2003.

  1. Sean Cody

    Sean Cody Guest

    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
     
    Sean Cody, Aug 22, 2003
    #1
    1. Advertising

  2. 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/
     
    Mike C. Fletcher, Aug 22, 2003
    #2
    1. Advertising

  3. On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
    <> 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.
     
    Christos TZOTZIOY Georgiou, Aug 23, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Lyman
    Replies:
    0
    Views:
    688
    Alex Lyman
    Mar 7, 2004
  2. Java and Swing
    Replies:
    1
    Views:
    698
    Chris Lambacher
    Oct 24, 2005
  3. Tim Golden
    Replies:
    0
    Views:
    449
    Tim Golden
    Oct 21, 2005
  4. rcmn
    Replies:
    1
    Views:
    364
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Nov 6, 2006
  5. Ralph Malph
    Replies:
    7
    Views:
    420
    Nachy
    May 14, 2010
Loading...

Share This Page