def find_executable_path(filename):
for path in os.environ["PATH"].split(os.pathsep):
full_path = os.path.join(path, filename)
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
return full_path
return None