PythonPath for ASP

Levente Sandor nospam at newsranger.com
Mon Jul 30 21:23:38 EDT 2001


In article <996471911.551564 at emperor.labs.agilent.com>, Brian Zhou says...

>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
sys.path.append("c:\\python21\\pil")
import Image
..
Another way goes trough the Windows Registry but I never tried that.

Levi






More information about the Python-list mailing list