# coding=utf-8 """确保项目根目录在 sys.path,便于从任意子包导入。""" import os import sys ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if ROOT not in sys.path: sys.path.insert(0, ROOT)