def GetStdout(cmdlist):
 job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
 out = job.communicate()[0]
 if (job.returncode != 0):
  sys.stderr.write((out + '\n'))
  raise GypError(('Error %d running %s' % (job.returncode, cmdlist[0])))
 return out.rstrip('\n')

def GetStdout ( cmdlist ) : job = subprocess . Popen ( cmdlist , stdout = subprocess . PIPE ) out = job . communicate ( ) [ 0 ] if ( job . returncode != 0 ) : sys . stderr . write ( ( out + '\n' ) ) raise GypError ( ( 'Error %d running %s' % ( job . returncode , cmdlist [ 0 ] ) ) ) return out . rstrip ( '\n' )
returns the content of standard output returned by invoking |cmdlist| .