In the python shell, using
import os print os.environ prints the complete list of environment variables with nothing missing. However when I call the interpreter with a filename:
sudo python file.py and use
import os print os.environ I see that some of the environment variables are missing in the dict.
Why do they behave differently?
Operating system: Ubuntu 14.04
sudo -E