title: Python - subprocess - getstatusoutput
body: <p>I'm new to Python and Programming as well. I know from Google's python class how to run external command using: </p>
  
  <blockquote>
    <p>(status, output) = commands.getstatusoutput(cmd)<br>
     if status:    ## Error case, print the command's output to stderr and exit<br>
       sys.stderr.write(output)<br>
       sys.exit(1)</p>
  </blockquote>
  
  <p>But I perceive that <em>commands</em> module is going obsolete. I want the status and the output, so I can print the output using sys.stderr.write() if there is any error. So, is there any equivalent command in <em>subprocess</em> module? I'm currently using:</p>
  
  <blockquote>
    <p>subprocess.call(args,shell=False) now.</p>
  </blockquote>
  
  <p>Thanks!</p>