📜  获取os环境python代码示例

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

代码示例1
import os
print(os.environ['HOME'])

# using get will return `None` if a key is not present rather than raise a `KeyError`
print(os.environ.get('KEY_THAT_MIGHT_EXIST'))