buzz/buzz/assets.py
2023-10-28 18:32:31 +01:00

9 lines
224 B
Python

import os
import sys
def get_asset_path(path: str):
if getattr(sys, "frozen", False):
return os.path.join(os.path.dirname(sys.executable), "buzz", path)
return os.path.join(os.path.dirname(__file__), path)