Last active
October 25, 2023 22:09
-
-
Save dmwyatt/c5d1081bd115d7c6e5af to your computer and use it in GitHub Desktop.
[Check if file is executable.]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_exe(filepath): | |
return os.path.isfile(filepath) and os.access(filepath, os.X_OK) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment