64
65
66
67
68
69
70
71
72
73
74
75 |
# Both
# find_executable() is only needed by channels/configwin
try:
from distutils.spawn import find_executable
except:
def find_executable(bin):
exists = [os.path.exists(dir+"/"+bin) for dir in os.environ.get("PATH").split(":")+["/"]]
return exists[0] if len(exists) else None
|
>
| 64
65
66
67
68
69
70
71
72
73
74
75
76 |
# Both
# find_executable() is only needed by channels/configwin
try:
from distutils.spawn import find_executable
except:
import os
def find_executable(bin):
exists = [os.path.exists(dir+"/"+bin) for dir in os.environ.get("PATH").split(":")+["/"]]
return exists[0] if len(exists) else None
|