Python查看当前文件所在目录

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

  

posted @ 2021-08-21 11:22  lucky_tomato  阅读(981)  评论(0编辑  收藏  举报