Linux Today: Linux News On Internet Time.





More on LinuxToday


How to change sys.path or PYTHONPATH in Python

Dec 09, 2015, 04:00 (0 Talkback[s])
(Other stories by Xmodulo)

When the Python interpreter executes a program which imports a module, it examines all directory paths listed in sys.path until it finds the module. By default, sys.path is constructed as a concatenation of (1) the current working directory, (2) content of PYTHONPATH environment variable, and (3) a set of default paths supplied by the installed Python interpreter.

Complete Story