code: def sh3(cmd):
      
      p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True,
                env=sub_environment())
      out, err = p.communicate()
      retcode = p.returncode
      if retcode:
          raise CalledProcessError(retcode, cmd)
      else:
          return out.rstrip(), err.rstrip()
docs: Execute command in a subshell, return stdout, stderr
  
      If anything appears in stderr, print it out to sys.stderr