Skip to content
This repository was archived by the owner on Mar 3, 2024. It is now read-only.

Commit 5e96367

Browse files
committed
getdata now works with pyinstaller onefile!
1 parent 73cd731 commit 5e96367

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fgmk/getdata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os.path
22
import sys
33

4+
#am I running from pyinstaller ?
45
if getattr(sys, 'frozen', False):
5-
data_path = os.path.join(os.environ.get("_MEIPASS2",os.path.abspath(".")),'data')
6+
data_path = os.path.join(os.path.join(sys._MEIPASS),'data')
67
elif __file__:
78
data_path = os.path.join(os.path.dirname(__file__),'data')
89

0 commit comments

Comments
 (0)