parameters: (cmd, path)
return_statement: return {'out': out.decode('utf-8'), 'err': err.decode('utf-8')}
docstring: Execute the specified command and return the result.
docstring_summary: Execute the specified command and return the result.
docstring_tokens: Execute the specified command and return the result .
function: def exec_cmd(cmd, path):
    """ Execute the specified command and return the result. """
    out = ''
    err = ''
    sys.stdout.write("-------- Running \"%s\" in \"%s\"...\n" % (cmd, path))
    parts = cmd.split()
    try:
      process = subprocess.Popen(
          parts,
          cwd=path,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          shell=(sys.platform == 'win32'))
      out, err = process.communicate()
    except IOError as e:
      (errno, strerror) = e.args
      raise
    except:
      raise
    return {'out': out.decode('utf-8'), 'err': err.decode('utf-8')}
function_tokens: def exec_cmd ( cmd , path ) : out = '' err = '' sys . stdout . write ( "-------- Running \"%s\" in \"%s\"...\n" % ( cmd , path ) ) parts = cmd . split ( ) try : process = subprocess . Popen ( parts , cwd = path , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = ( sys . platform == 'win32' ) ) out , err = process . communicate ( ) except IOError as e : ( errno , strerror ) = e . args raise except : raise return { 'out' : out . decode ( 'utf-8' ) , 'err' : err . decode ( 'utf-8' ) }