📌  相关文章
📜  python 当前工作目录 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:44.381000             🧑  作者: Mango

代码示例6
# If by "current working directory" you mean 
# the directory in which is saved the script in execution, then:
import os
cwd = os.path.dirname(os.path.realpath(__file__))
print(cwd)