def can_exe(self, fpath): """ Can test if path exists and is executable """ if isinstance(fpath, basestring): return isfile(fpath) and access(fpath, X_OK) return False