0
点赞
收藏
分享

微信扫一扫

Python 获取文件路径及文件目录

小桥流水2016 2022-08-23 阅读 91

import os

print (os.path.dirname(__file__))
print (os.path.abspath(__file__))
print (os.path.abspath(os.path.dirname(__file__)))
print (os.path.dirname(os.path.abspath(__file__)))

  



举报

相关推荐

0 条评论