import os
import sys

# 获取当前脚本的完整路径
full_path = os.path.abspath(__file__)

# 获取脚本所在目录路径
dir_path = os.path.dirname(full_path)

# 设置 PYTHONPATH 环境变量
os.environ['PYTHONPATH'] = dir_path

# 输出验证
print(f"PYTHONPATH is set to: {os.environ['PYTHONPATH']}")

# 如果需要运行其他 Python 文件：
# os.system(f'python {os.path.join(dir_path, "your_script.py")}')
