Here are important environment variables, which can be recognized by Python −
Sr.No. | Variable & Description |
---|---|
1 | PYTHONPATHIt has a role similar to PATH. This variable tells the Python interpreter where to locate the module files imported into a program. It should include the Python source library directory and the directories containing Python source code. PYTHONPATH is sometimes preset by the Python installer. |
2 | PYTHONSTARTUPIt contains the path of an initialization file containing Python source code. It is executed every time you start the interpreter. It is named as .pythonrc.py in Unix and it contains commands that load utilities or modify PYTHONPATH. |
3 | PYTHONCASEOKIt is used in Windows to instruct Python to find the first case-insensitive match in an import statement. Set this variable to any value to activate it. |
4 | PYTHONHOMEIt is an alternative module search path. It is usually embedded in the PYTHONSTARTUP or PYTHONPATH directories to make switching module libraries easy. |
5 | PYTHONIOENCODING – Encoding[:errors] used for stdin/stdout/stderr. |
6 | PYTHONFAULTHANDLER – dump the Python traceback on fatal errors. |
7 | PYTHONHASHSEED – if this variable is set to ‘random’, a random value is used to seed the hashes of str and bytes objects. It can also be set to an integer in the range [0,4294967295] to get hash values with a predictable seed. |
8 | PYTHONMALLOC – set the Python memory allocators and/or install debug hooks on Python memory allocators. Use PYTHONMALLOC=debug to install debug hooks. |
9 | PYTHONCOERCECLOCALE – if this variable is set to 0, it disables the lcale coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of locale coercion and locale compatibility warnings on stderr. |
10 | PYTHONBREAKPOINT – if this variable is set to 0, it disables the default debugger. It can be set to the callable of your debugger of choice. PYTHONDEVMODE: enable the development mode. |
11 | PYTHONPYCACHEPREFIX – root directory for bytecode cache (pyc) files. |
Python Advanced Programming Tutorials and Networking Part 1 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 2 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 3 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 4 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 5 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 6 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 7 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 8 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 9 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 10 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 11 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 12 out 13 — By DevOpsSchool
Python Advanced Programming Tutorials and Networking Part 13 out 13 — By DevOpsSchool
Latest posts by Rajesh Kumar (see all)
- Laravel breeze vs laravel fortify comparison - December 17, 2024
- How to Choose Wireless Access Points for Office - December 13, 2024
- Online Real Estate Courses: Navigating the Shift to Digital Education - December 13, 2024