【发布时间】:2020-04-06 12:30:37
【问题描述】:
我需要使用 pyhon 以编程方式查找默认的“文档”目录路径
import os
print(os.getcwd())
我可以使用上面的代码访问当前目录。如何获取默认的“Document”目录。
【问题讨论】:
-
这能回答你的问题吗? How to get the home directory in Python? 有了主目录后,只需添加“Documents”目录即可。
标签: python directory path document