def out_and_err(command, input=None, shell=False, env=None):
 process = Popen(command, stdout=PIPE, stdin=PIPE, stderr=PIPE, shell=shell, env=env)
 (out, err) = process.communicate(input=input)
 status = process.poll()
 if status:
  error = CalledProcessError(status, command)
  error.output = out
  raise error
 return (out, err)

def out_and_err ( command , input = None , shell = False , env = None ) : process = Popen ( command , stdout = PIPE , stdin = PIPE , stderr = PIPE , shell = shell , env = env ) ( out , err ) = process . communicate ( input = input ) status = process . poll ( ) if status : error = CalledProcessError ( status , command ) error . output = out raise error return ( out , err )
run a shell command .