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

Function get_pythonexe

numpy/distutils/exec_command.py:107–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 return name
106
107def get_pythonexe():
108 pythonexe = sys.executable
109 if os.name in ['nt', 'dos']:
110 fdir, fn = os.path.split(pythonexe)
111 fn = fn.upper().replace('PYTHONW', 'PYTHON')
112 pythonexe = os.path.join(fdir, fn)
113 assert os.path.isfile(pythonexe), '%r is not a file' % (pythonexe,)
114 return pythonexe
115
116def find_executable(exe, path=None, _cache={}):
117 """Return full path of a executable or None.

Callers 1

setup_methodMethod · 0.90

Calls 4

replaceMethod · 0.80
upperMethod · 0.80
splitMethod · 0.45
joinMethod · 0.45

Tested by 1

setup_methodMethod · 0.72