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

Function _run_quiet

Tools/freeze/test/freeze.py:30–50  ·  view source on GitHub ↗
(cmd, *, cwd=None)

Source from the content-addressed store, hash-verified

28
29
30def _run_quiet(cmd, *, cwd=None):
31 if cwd:
32 print('+', 'cd', cwd, flush=True)
33 print('+', shlex.join(cmd), flush=True)
34 try:
35 return subprocess.run(
36 cmd,
37 cwd=cwd,
38 capture_output=True,
39 text=True,
40 check=True,
41 )
42 except subprocess.CalledProcessError as err:
43 # Don't be quiet if things fail
44 print(f"{err.__class__.__name__}: {err}")
45 print("--- STDOUT ---")
46 print(err.stdout)
47 print("--- STDERR ---")
48 print(err.stderr)
49 print("---- END ----")
50 raise
51
52
53def _run_stdout(cmd):

Callers 4

_run_stdoutFunction · 0.85
copy_source_treeFunction · 0.85
prepareFunction · 0.85
freezeFunction · 0.85

Calls 2

joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…