Sat*_*tor 7 directory path python-3.x pathlib
我想替换file_location = os.path.abspath(os.path.dirname(__file__))
为pathlib来获取没有文件名的文件的绝对路径
使用 using directorypath = pathlib.Path(__file__).resolve()
给我绝对路径+文件名
我怎样才能获得没有文件名的绝对路径?
| 归档时间: |
|
| 查看次数: |
5747 次 |
| 最近记录: |