Created
March 23, 2020 05:25
-
-
Save ariesduanmu/6b941b2cfb86d63c0a4ae30db89917e0 to your computer and use it in GitHub Desktop.
get exe file address
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 | |
| if getattr(sys, 'frozen', False): | |
| basedir = os.path.dirname(sys.executable) | |
| else: | |
| basedir = os.getcwd() | |
| print(basedir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment