Created
December 6, 2022 06:41
-
-
Save hisplan/5d852f6fc20cb717da8e339b189b0e17 to your computer and use it in GitHub Desktop.
Check if Python is running in 32-bit or 64-bit
This file contains hidden or 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
# check if Python is running in 32-bit or 64-bit | |
# | |
# python -c "import struct;print(struct.calcsize('P')*8)" | |
# | |
import struct | |
# will return 32 for 32-bit, 64 for 64-bit | |
print(struct.calcsize("P") * 8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment