def is_executable ( path ) : return os . path . isfile ( path ) and os . access ( path , os . X_OK )
python determine if a file is executable
Returns whether a path names an existing executable file .
def is_executable(path):
  """Returns whether a path names an existing executable file."""
  return os.path.isfile(path) and os.access(path, os.X_OK)