def IsExecutable(filename):
  return os.path.isfile(filename) and os.access(filename, os.X_OK)
Checks whether a file exists and is executable.
dataset/ETHPy150Open ganeti/ganeti/lib/utils/wrapper.py/IsExecutable