parameters: (cmd)
return_statement: return status, output
docstring: cmd is a list.
docstring_summary: cmd is a list.
docstring_tokens: cmd is a list .
function: def getstatusoutput(cmd):
      """cmd is a list.
      """
      try:
          process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
          output, _ = process.communicate()
          status = process.returncode
      except:
          status = -1
          output = traceback.format_exc()
      return status, output
function_tokens: def getstatusoutput ( cmd ) : try : process = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . STDOUT ) output , _ = process . communicate ( ) status = process . returncode except : status = - 1 output = traceback . format_exc ( ) return status , output