[[python_wiki:os_env_variables]]

OS ENV Variables

General Information

Using OS environmental variables.

Checklist

  • Import the “os” module

The Code

#!/usr/bin/python
 
import os
 
user_home=os.environ.get('HOME')
 
print "Home is: " + user_home

  • python_wiki/os_env_variables.txt
  • Last modified: 2019/05/26 03:50
  • (external edit)