I have a setup script (not mine) which reads a certain system variable. I tried setting this in two ways:
- Going to control panel > User Accounts > Change my environment variables
- In command line: setx myvar myvalue
I set it as user variables, since i don't have the rights to set system variables. If i open a new command line window and type set, my variable shows there correctly.
However, if i start python and run the following script, i don't see my variable:
import os
print os.environ
I am using windows 10 and python 2.7. Modifying the code to get the variable is not possible since it is code from an external library.