Re: the module load path

Guido.van.Rossum@cwi.nl
Thu, 02 Feb 1995 09:43:13 +0100

> Is there a way to add directories to the module load path? I tried
> appending to sys.path, but that didn't work since its read only.

What gives you that idea? In fact it's documented early on in the
tutorial, in the man page, and in the relevant section of the library
manual! Try

sys.path.append('/etc')

or even

sys.path = ['/usr/local/lib/python', '/etc']

--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>