MCPcopy Index your code
hub / github.com/python/cpython / _call

Method _call

Lib/test/support/__init__.py:1744–1756  ·  view source on GitHub ↗
(self, python, args, env, returncode)

Source from the content-addressed store, hash-verified

1742 print("failed to clean up {}: {}".format(link, ex))
1743
1744 def _call(self, python, args, env, returncode):
1745 import subprocess
1746 cmd = [python, *args]
1747 p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
1748 stderr=subprocess.PIPE, env=env)
1749 r = p.communicate()
1750 if p.returncode != returncode:
1751 if verbose:
1752 print(repr(r[0]))
1753 print(repr(r[1]), file=sys.stderr)
1754 raise RuntimeError(
1755 'unexpected return code: {0} (0x{0:08X})'.format(p.returncode))
1756 return r
1757
1758 def call_real(self, *args, returncode=0):
1759 return self._call(self.real, args, None, returncode)

Callers 10

call_realMethod · 0.95
call_linkMethod · 0.95
__call__Method · 0.45
__call__Method · 0.45
__del__Method · 0.45
actualMethod · 0.45
cgetMethod · 0.45
configMethod · 0.45
measureMethod · 0.45
metricsMethod · 0.45

Calls 2

communicateMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected