[[python_wiki:os_env_variables]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python_wiki:os_env_variables [2019/05/26 03:50] (current)
Line 1: Line 1:
 +====== OS ENV Variables ======
 +
 +**General Information**
 +
 +Using OS environmental variables. ​
 +
 +**Checklist**
 +  * Import the "​os"​ module
 +
 +----
 +
 +====== The Code ======
 +
 +<code python>
 +#​!/​usr/​bin/​python
 +
 +import os
 +
 +user_home=os.environ.get('​HOME'​)
 +
 +print "Home is: " + user_home
 +</​code>​
 +
 +----
  
  • python_wiki/os_env_variables.txt
  • Last modified: 2019/05/26 03:50
  • (external edit)