Created
July 23, 2020 17:53
-
-
Save alekssamos/2c56151ba1ee9e0013b7849e1ccfad3f to your computer and use it in GitHub Desktop.
_MEIPASS onefile
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, sys | |
| def resource(relative_path): | |
| if getattr(sys, 'frozen', False): | |
| return os.path.join(sys._MEIPASS, relative_path) | |
| return os.path.join(os.path.abspath('.'), relative_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment