os.environ does not contain HOST variable
Question: What could be the cause that os.environ does not contain the HOST environment
variable under Linux, except I set it explicitly for the interpreter
environment?

    
    
    > echo $HOST; python -c 'import os; print "HOST" in os.environ'
    bbox
    False
    > echo $HOST; HOST=$HOST python -c 'import os; print "HOST" in os.environ'
    bbox
    True
    

EDIT: Thanks for the suggestion to `export`, however, why are most of the
other variables available, like `USER, PS1, LANG,...` without explicitly
exporting them?


Answer: This means that you've got a variable called `HOST` defined in your shell, but
have not exported it.

Try this:

    
    
    export HOST
    

Environment variables are not passed to child processes unless they have been
exported this way.

