PythonPath for ASP

Jim Abrams jim at
Tue Jul 31 17:05:25 CEST 2001

Levente Sandor <nospam at> wrote in
<uMn97.12165$ar1.37961 at>: 

>In article <996471911.551564 at>, Brian Zhou
>> Is there a place I can set that makes C:\Python21\PIL in PythonPath?
>Create a file with the extension ".pth" in your Python installation
>directory, then add the line PIL
>to it. You can add more (both relative and absolute) paths to the Python
>path in this way, each one in a new line. (You must restart the Python
>interpreter after doing this.)
>Or: you can do it (temporarily) anywhere in your script:
>import sys
>import Image

Remember that the sys module is cached, so repeat calls to this would 
pollute the path.
if "c:\\python21\\pil" not in sys.path: sys.path.append("c:\\python21\\pil")

>Another way goes trough the Windows Registry but I never tried that.
With 2.1 being whatever version you have.

Also site-packages isn't in your path. You might want to add it. It doesn't 
seem to get in there on windows.

More information about the Python-list mailing list