mirror of
https://github.com/RolandWH/SIPPCompare.git
synced 2025-06-07 13:51:33 +01:00
13 lines
405 B
Python
13 lines
405 B
Python
import os.path
|
|
import sys
|
|
|
|
|
|
# If using PyInstaller, use it's temporary path, otherwise use cwd
|
|
# Credit: https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile/13790741#13790741
|
|
def get_res_path(relative_path):
|
|
try:
|
|
base_path = sys._MEIPASS
|
|
except AttributeError:
|
|
base_path = os.path.abspath(".")
|
|
|
|
return os.path.join(base_path, relative_path) |