use of import of PIL incorrectly documented, or is it just me ?

Jim Abrams jim at publishingresources.com
Tue May 1 11:44:03 EDT 2001


"Steve  Holden" <sholden at holdenweb.com> wrote in
<owzH6.55391$qc2.14279101 at typhoon.southeast.rr.com>: 

>>> import sys
>>> sys.path.append('C:/Python20/Lib/site-packages')
>> 
>> 
>> Careful about using this if the interpreter isn't restarted every time
>> (i.e. Python in ASP) since this adds the path over and over. Maybe
>> if sys.path.count('C:/Python20/Lib/site-packages') == 0:
>> sys.path.append('C:/Python20/Lib/site-packages')
>> 
>> 
>> Also site-packages isn't put into the Python Path with ActiveState
>> ActivePython. You can add it to the registry.
>> HKEY_LOCAL_MACHINE/Python/PythonCore/20/
>> 
>> Look at the other keys there and copy one and put in site-packages.
>> 
>
>Although one might use the sitecustomize module for this, since that is
>what it is provided for ...


Ya, easier then editting the Reg, course my sitecustomize was in 
/site-packages.. so I had to come up with a different idea.

Also putting a .pth file in the Python dir with lib/site-packages worked 
too, but I was looking to mimic the unix counterpart.

Whatever's best for you.





More information about the Python-list mailing list