On unix ( and I think DOS ) you can set PYTHONPATH from the shell
before running Python. The PYTHONPATH variable gets prepended to
the compiled in settings.
Within Python, those values are accessable ( and changable ) via the
list sys.path.
$ PYTHONPATH=$HOME/Python:$HOME/Python/Lib
$ python
Python 1.0.1 (Mar 15 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.path
['/home/sdm7g/Python', '/home/sdm7g/Python/Lib', '.',
'/usr/local/lib/python', '/usr/local/lib/python/test']
>>> sys.path.append( '/home/sdm7g/Python/Test' )
>>> sys.path
['/home/sdm7g/Python', '/home/sdm7g/Python/Lib', '.',
'/usr/local/lib/python', '/usr/local/lib/python/test', '/home/sdm7g/Python/Test']
>>>
- Steve M.