title: How to make a simple ping and save the result in a file in Python with os.system
body: <p>I wrote this simple script in Python:</p>
  
  <pre><code>import os
  os.system("ping www.google.com")
  </code></pre>
  
  <p>It's working in interactive mode from cmd of windows, but seems it doesn't work if I write on IDLE (it appear a cmd black screen). This is the first problem.</p>
  
  <p>The second thing that I like to do is this:
  I'd like to save the results of the pings in a file 
  How can I do it?</p>
  
  <p>I'm novice of Python (two days) ;)
  Thanks a lot.</p>