[Python] python获得当前文件的上层文件夹路径 →→→→→进入此内容的聊天室

来自 , 2021-02-01, 写在 Python, 查看 144 次.
URL http://www.code666.cn/view/dff1749a
  1. import os
  2. print os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))

回复 "python获得当前文件的上层文件夹路径"

这儿你可以回复上面这条便签

captcha