我们知道在python下可以用以下代码: import os current_path=os.path.dirname(__file__) 取得父文件夹绝对路径的方法如下: os.path.abspath(os.path.dirname(__file__)+os.path.sep+"..")记录一下! 来源:CSDN作者:stonefisher链接:https://blog.csdn.net/wenxuansoft/article/details/48318625 标签 绝对路径