"Kent Johnson" <[EMAIL PROTECTED]> wrote > PYTHONPATH is for your own customizations of sys.path, it is not the > entirety of sys.path. AFAIK you don't have to define it at all if > you > don't want to use it.
All true. The point of PYTHONPATH is that you could have several users all running python on the same box (either concurrently on a server or different users ion the same PC at different times) PYTHONPATH allows each user to have their own custom additions to sys.path. > There are quite a few ways to get a module into the search path, > modifying PYTHONPATH is just one way. Some others: > - create a site-packages/ dir in the Python lib dir. Put your > modules > and packages there and they will be found by Python. Usually used for non standard packages like wxPython, pyGame etc that all users will want to have available > - add a .pth file to site-packages/ that contains the path to the > dir > you want to add to sys.path Similar to above but allows different Python installs on the same machine to share the same library. > - modify sys.path directly in code. This is best if only one (or a very few) application needs access to the modules. Especially if they are intended to mask standard modules like os. So use PYTHONPATH for individual tailoring and sitepackages etc for site wide changes. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor