import os import sys APP_PATH = os.path.dirname(sys.executable) if getattr(sys, "frozen", False) else os.path.dirname(__file__)