绝对路径

os.path.abspath("文件名")  参数可为“”即当前路径

 

相对路径

os.path.dirname("文件名")   参数可为“”即当前路径

 

python绝对路径相对路径函数

相关文章: