()
| 105 | return name |
| 106 | |
| 107 | def 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 | |
| 116 | def find_executable(exe, path=None, _cache={}): |
| 117 | """Return full path of a executable or None. |