Created
August 3, 2018 22:36
-
-
Save erdemarslan/c5a7eae2b009505dc01cd2fd90a218b7 to your computer and use it in GitHub Desktop.
is computer x64 or x86
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
| import os | |
| def Is64Windows(): | |
| return 'PROGRAMFILES(X86)' in os.environ | |
| def GetProgramFiles32(): | |
| if Is64Windows(): | |
| return os.environ['PROGRAMFILES(X86)'] | |
| else: | |
| return os.environ['PROGRAMFILES'] | |
| def GetProgramFiles64(): | |
| if Is64Windows(): | |
| return os.environ['PROGRAMW6432'] | |
| else: | |
| return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment