title: check output from CalledProcessError
body: <p>I am using subprocess.check_output from pythons subprocess module to execute a ping command. Here is how I am doing it:</p>
  
  <pre><code>output = subprocess.check_output(["ping","-c 2 -W 2","1.1.1.1")
  </code></pre>
  
  <p>It is raising a CalledProcessError and says the output is one of the arguments of the function. Can anyone help me how to read that output. I would like to read the output into a string and parse it. So say for example if the ping returns </p>
  
  <blockquote>
    <p>100% packet loss</p>
  </blockquote>
  
  <p>I need to capture that. If there is any other better way..please suggest. Thanks.</p>