added pyinstaller find current folder
This commit is contained in:
parent
e3b3cc67bd
commit
817293f669
10
hcatitles.py
10
hcatitles.py
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user