Advertisement
AceScottie

pyinstaller fixer

Apr 19th, 2019
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. if os.name == 'nt': #windows fix
  2.     import win32api, win32con
  3. if getattr(sys, 'frozen', False): #windows path fix
  4.     #os.chdir(sys._MEIPASS)
  5.     exe_path = os.path.dirname(sys.executable)
  6. elif __file__:
  7.     exe_path = os.path.dirname(__file__)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement