标签:获取 dir python 文件 div code app python3 base
import os,sys base_dir=os.path.dirname(__file__) sys.path.append(base_dir) #临时修改环境变量
python3找到当前文件执行路径,并加入临时环境变量
原文地址:https://www.cnblogs.com/hourglass-/p/9245515.html