Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get os environment python

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'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #os #environment #python
ADD COMMENT
Topic
Name
2+3 =