Google News
logo
Python - Interview Questions
What is the purpose of PYTHONSTARTUP, PYTHONCASEOK, and PYTHONHOME environment variables?
PYTHONSTARTUP : It contains the path of an initialization file having Python source code. It is executed every time we start the interpreter. It is named as .pythonrc.py in Unix, and it contains commands that load utilities or modify PYTHONPATH.

PYTHONCASEOK : It is used in Windows to instruct Python to find the first case-insensitive match in an import statement. We can set this variable with any value to activate it.

PYTHONHOME : It is an alternative module search path. It is usually embedded in PYTHONSTARTUP or PYTHONPATH directories to make switching of module libraries easy.
Advertisement