修复:第一次运行时,无法找到 questions.csv

This commit is contained in:
cantyonion committed 2025-05-18 12:02:35 +08:00
1 parent 6961b70a7d
commit 83b3790e8b
3 files changed
+13 -10

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import os
import sys
def resource_path(relative_path: str) -> str:
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)