title: Multiple ping script in Python
body: <p>I'm unable to find any good easy to learn documentation on python and networking.  In this instance, I'm just trying to make a easy script which I can ping a number of remote machines.</p>
  
  <pre><code>for ping in range(1,10):
     ip="127.0.0."+str(ping)
     os.system("ping -c 3 %s" % ip)
  </code></pre>
  
  <p>A simple script like that will ping the machines fine, but I'd like to get the script to returns 'active' 'no response'  Which makes me think I'll have to look up the time module as well, I think <code>time.sleep(5)</code> and after that, there would be a break statement. Which makes me think there should be a while loop inside for. I'm not 100% sure, I could be going in the wrong direction completely :/ if anyone could help or point me in the direction of some documentation that'd be great.</p>