记录下os.path.dirname(__file__)使用

os.path.dirname(__file__)使用 该测试脚本所在的位置:D:\第1层\第2层\第3层\第4层\第5层\test11.pypython test11.py架构 import os #该文件所在位置:D:\第1层\第2层\第3层\第4层\第5层\test11.py path1 = os.path.dirname(__file__) print(path1)#获取当前运行脚本的绝
相关文章
相关标签/搜索