10 lines
241 B
Python
10 lines
241 B
Python
import os
|
|
import sys
|
|
|
|
# 将项目根目录加入 Python 路径,确保可以导入 `src` 包
|
|
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
if PROJECT_ROOT not in sys.path:
|
|
sys.path.insert(0, PROJECT_ROOT)
|
|
|
|
|