def readpipe(argv, preexec_fn=None, shell=False):
 p = subprocess.Popen(argv, stdout=subprocess.PIPE, preexec_fn=preexec_fn, shell=shell)
 (out, err) = p.communicate()
 if (p.returncode != 0):
  raise Exception(('subprocess %r failed with status %d' % (' '.join(argv), p.returncode)))
 return out

def readpipe ( argv , preexec_fn = None , shell = False ) : p = subprocess . Popen ( argv , stdout = subprocess . PIPE , preexec_fn = preexec_fn , shell = shell ) ( out , err ) = p . communicate ( ) if ( p . returncode != 0 ) : raise Exception ( ( 'subprocess %r failed with status %d' % ( ' ' . join ( argv ) , p . returncode ) ) ) return out
run a subprocess and return its output .