[Pythonmac-SIG] How to provide additions to python path such that all executions of a given python binary will see them?

Bob Ippolito bob at redivi.com
Tue Jun 22 12:07:33 EDT 2004


On Jun 17, 2004, at 8:55 PM, Kenneth McDonald wrote:

> Currently, I modify my python path through inclusion of a PYTHONPATH 
> variable
> in the .login file. However, I need to add a /local/python/packages 
> directory
> to the path in such a manner that all executions of the system python 
> binary
> see /local/python/packages. I was just wondering up the best (least 
> hacky)
> way of doing this might be.

Add a one line text file named "arbitraryuniquename.pth" to 
~/Library/Python/2.3/site-packages/ (or 
/Library/Python/2.3[/site-packages] if you want it to be system wide.  
Apple's version is with site-packages, the standard distribution is 
without) with the contents "/local/python/packages" sans quotes.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040622/829d1d29/smime.bin


More information about the Pythonmac-SIG mailing list