I set an environment variable that I want to access in my Python application. How do I get its value?
You can access to the environment variables using
import os print os.environ
Try to see the content of PYTHONPATH or PYTHONHOME environment variables, maybe this will be helpful for your second question. However you should clarify it.