added pyinstaller find current folder
This commit is contained in:
1 parent
e3b3cc67bd
commit
817293f669
1 file changed
+9
-1
+9
-1
@@ -1,8 +1,16 @@
|
||||
import os
|
||||
import PySimpleGUI as sg
|
||||
from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageFont, ImageOps
|
||||
from io import BytesIO
|
||||
|
||||
# Globals
|
||||
|
||||
def resource_path(relative_path):
|
||||
""" Get absolute path to resource, works for dev and for PyInstaller """
|
||||
try:
|
||||
base_path = sys._MEIPASS
|
||||
except Exception:
|
||||
base_path = os.path.abspath(".")
|
||||
return os.path.join(base_path, relative_path)
|
||||
|
||||
|
||||
def update_image(original, title, subtitle):
|
||||
|
||||
Reference in new issue
Block a user