MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / run_shell

Function run_shell

configure.py:146–156  ·  view source on GitHub ↗
(cmd, allow_non_zero=False, stderr=None)

Source from the content-addressed store, hash-verified

144
145
146def run_shell(cmd, allow_non_zero=False, stderr=None):
147 if stderr is None:
148 stderr = sys.stdout
149 if allow_non_zero:
150 try:
151 output = subprocess.check_output(cmd, stderr=stderr)
152 except subprocess.CalledProcessError as e:
153 output = e.output
154 else:
155 output = subprocess.check_output(cmd, stderr=stderr)
156 return output.decode('UTF-8').strip()
157
158def cygpath(path):
159 """Convert path from posix to windows."""

Callers 5

get_python_pathFunction · 0.85
get_python_major_versionFunction · 0.85
check_bazel_versionFunction · 0.85
is_cuda_compatibleFunction · 0.85

Calls 2

stripMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected