From 63ab7fa2463178469bced5602a135c2f7f208c46 Mon Sep 17 00:00:00 2001 From: Qian-F <576765349@qq.com> Date: Thu, 23 May 2024 15:25:05 +0800 Subject: [PATCH] Update trans.py --- trans.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trans.py b/trans.py index ed23bf0..262e000 100644 --- a/trans.py +++ b/trans.py @@ -1,3 +1,4 @@ +import sys import tkinter as tk from tkinter import ttk, messagebox, Menu import json @@ -5,7 +6,7 @@ import os import re -script_dir = os.path.dirname(os.path.abspath(__file__)) +script_dir = os.path.dirname(os.path.realpath(sys.executable)) CONFIG_FILE = os.path.join(script_dir, 'gui_config.ini') file_path = os.path.join(script_dir, 'dict.json')