MCPcopy Create free account
hub / github.com/numpy/numpy / getoutput

Function getoutput

numpy/distutils/cpuinfo.py:27–35  ·  view source on GitHub ↗
(cmd, successful_status=(0,), stacklevel=1)

Source from the content-addressed store, hash-verified

25
26
27def getoutput(cmd, successful_status=(0,), stacklevel=1):
28 try:
29 status, output = getstatusoutput(cmd)
30 except OSError as e:
31 warnings.warn(str(e), UserWarning, stacklevel=stacklevel)
32 return False, ""
33 if os.WIFEXITED(status) and os.WEXITSTATUS(status) in successful_status:
34 return True, output
35 return False, output
36
37def command_info(successful_status=(0,), stacklevel=1, **kw):
38 info = {}

Callers 3

command_infoFunction · 0.85
command_by_lineFunction · 0.85
__init__Method · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected