Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #================ADD-IMAGE-ICON=================
- import os
- import sys
- def resource_path(relative_path):
- """ Get the absolute path to the resource, works for PyInstaller. """
- if getattr(sys, '_MEIPASS', False):
- return os.path.join(sys._MEIPASS, relative_path)
- return os.path.join(os.path.abspath("."), relative_path)
- # Use this function to load files:
- #splash_image = resource_path("THEME/splash-7.png")
- icon_path = resource_path("CONVER.ico")
- #================ADD-IMAGE-ICON=================
- self.root.iconbitmap(icon_path)
- pyinstaller --onefile --windowed --name=ENGLISH-URDU-CONVERSATION --icon=CONVER.ico --add-data "CONVER.ico;." ENGLISH-URDU-CONVERSATION.py
- pyinstaller --onefile --windowed --name=ENGLISH-URDU-DICTIONARY --icon=DIC.ico --add-data "DIC.ico;." ENGLISH-URDU-DICTIONARY.py
Advertisement
Add Comment
Please, Sign In to add comment