首页 > 技术文章 > python获取当前文件的上一级目录

WebLinuxStudy 2019-12-27 15:54 原文

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

 

推荐阅读