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

Function getnm

numpy/distutils/lib2def.py:62–72  ·  view source on GitHub ↗

Returns the output of nm_cmd via a pipe. nm_output = getnm(nm_cmd = 'nm -Cs py_lib')

(nm_cmd=['nm', '-Cs', 'python%s.lib' % py_ver], shell=True)

Source from the content-addressed store, hash-verified

60 return libfile, deffile
61
62def getnm(nm_cmd=['nm', '-Cs', 'python%s.lib' % py_ver], shell=True):
63 """Returns the output of nm_cmd via a pipe.
64
65nm_output = getnm(nm_cmd = 'nm -Cs py_lib')"""
66 p = subprocess.Popen(nm_cmd, shell=shell, stdout=subprocess.PIPE,
67 stderr=subprocess.PIPE, text=True)
68 nm_output, nm_err = p.communicate()
69 if p.returncode != 0:
70 raise RuntimeError('failed to run "%s": "%s"' % (
71 ' '.join(nm_cmd), nm_err))
72 return nm_output
73
74def parse_nm(nm_output):
75 """Returns a tuple of lists: dlist for the list of data

Callers 1

lib2def.pyFile · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected