Win32 ping

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sean Cody

    Win32 ping

    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

  • Mike C. Fletcher

    #2
    Re: Win32 ping

    Sean Cody wrote:
    [color=blue]
    > Does anyone know of an ping module that will work with Windows?[/color]

    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





    Comment

    • Christos TZOTZIOY Georgiou

      #3
      Re: Win32 ping

      On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
      <null-i_do_not_like_s pam@tfh.ca> might have written:
      [color=blue]
      >I tried that but it complains about not having os.fork() available.
      >dir(os) does not contain fork.[/color]

      Huh?

      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
      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.

      Comment

      • Christos TZOTZIOY Georgiou

        #4
        Re: Win32 ping

        On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
        <null-i_do_not_like_s pam@tfh.ca> might have written:
        [color=blue]
        >I tried that but it complains about not having os.fork() available.
        >dir(os) does not contain fork.[/color]

        Huh?

        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
        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.

        Comment

        Working...