📜  工作目录 python 代码示例

📅  最后修改于: 2022-03-11 14:45:24.479000             🧑  作者: 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)