parameters: (command, cwd=None)
return_statement: return (output, proc.returncode)
docstring: Run an arbitrary command, returning its output and return code. Since
    output is collected via communicate(), there will be no output until the
    call terminates. If you need output while the program runs (ie. so
    that the buildbot doesn't terminate the script), consider RunProcess().
  
    Args:
      command: A list containing the command and args to execute.
  
    Returns:
      A tuple of the output and return code.
docstring_summary: Run an arbitrary command, returning its output and return code. Since
    output is collected via communicate(), there will be no output until the
    call terminates. If you need output while the program runs (ie. so
    that the buildbot doesn't terminate the script), consider RunProcess().
docstring_tokens: Run an arbitrary command returning its output and return code . Since output is collected via communicate () there will be no output until the call terminates . If you need output while the program runs ( ie . so that the buildbot doesn t terminate the script ) consider RunProcess () .
function: def RunProcessAndRetrieveOutput(command, cwd=None):
    """Run an arbitrary command, returning its output and return code. Since
    output is collected via communicate(), there will be no output until the
    call terminates. If you need output while the program runs (ie. so
    that the buildbot doesn't terminate the script), consider RunProcess().
  
    Args:
      command: A list containing the command and args to execute.
  
    Returns:
      A tuple of the output and return code.
    """
    # On Windows, use shell=True to get PATH interpretation.
    shell = IsWindows()
    proc = subprocess.Popen(command, shell=shell, stdout=subprocess.PIPE, cwd=cwd)
  
    (output, _) = proc.communicate()
  
    return (output, proc.returncode)
function_tokens: def RunProcessAndRetrieveOutput ( command , cwd = None ) : # On Windows, use shell=True to get PATH interpretation. shell = IsWindows ( ) proc = subprocess . Popen ( command , shell = shell , stdout = subprocess . PIPE , cwd = cwd ) ( output , _ ) = proc . communicate ( ) return ( output , proc . returncode )