parameters: (cmd)
return_statement: return stdout.strip() if stdout else stderr
docstring: return command output but not check return value
docstring_summary: return command output but not check return value
docstring_tokens: return command output but not check return value
function: def cmd_output(cmd):
      """ return command output but not check return value """
      p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
      stdout, stderr = p.communicate()
  
      return stdout.strip() if stdout else stderr
function_tokens: def cmd_output ( cmd ) : p = subprocess . Popen ( cmd , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True ) stdout , stderr = p . communicate ( ) return stdout . strip ( ) if stdout else stderr