python 获取项目的根路径

root_path = os.path.abspath(os.path.dirname(__file__)).split('shippingSchedule')[0]
shippingSchedule 为项目名字
原文地址:https://www.cnblogs.com/angdh/p/10632651.html