Merge pull request #592 from Guovin/dev

chore:tkinter
This commit is contained in:
Govin 2024-11-29 16:32:40 +08:00 committed by GitHub
commit 95a8d4009c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,19 +19,6 @@ from hotel import HotelUI
from subscribe import SubscribeUI
from online_search import OnlineSearchUI
import json
from pathlib import Path
from sys import base_prefix
from os import environ
import platform
if not ("TCL_LIBRARY" in environ and "TK_LIBRARY" in environ):
try:
tk.Tk()
except tk.TclError:
tk_dir = "tcl" if platform.system() == "Windows" else "lib"
tk_path = Path(base_prefix) / tk_dir
environ["TCL_LIBRARY"] = str(next(tk_path.glob("tcl8.*")))
environ["TK_LIBRARY"] = str(next(tk_path.glob("tk8.*")))
class TkinterUI: