240 发简信
IP属地:北京
  • os.path.dirname(__file__)方法详解

    该测试脚本所在的位置:D:\第1层\第2层\第3层\第4层\第5层\test11.py 结果: os.path.dirname(file)返回脚本的路径,但是需要注意一下几点...