1.python的当前目录
d = os.path.dirname(__file__)
2.父目录
parent_path = os.path.dirname(d)
python的目录
原文:https://www.cnblogs.com/Stephen-Qin/p/10243473.html