Maurice LING <mauriceling at acm.org> writes: > Is there a way of getting the path to the site-packages directory? >>> import sys >>> import os >>> for dir in sys.path: ... if os.path.split(dir)[-1] == 'site-packages': ... print dir ... /usr/opt/lib/python2.4/site-packages >>> But there's seldom a reason to want this. > Considering that Mac OSX with Fink installs python libraries in > /sw/lib/python<version>, Mac OSX itself has python libraries in > /System/Library/Frameworks/Python.framework/Versions/<version>/lib, etc > etc... And darwinportgs puts them in /Library/Frameworks/Python.framework/Versions/<Version>/lib/... but includes /opt/local/lib/python2.4/site-packages in sys.path. <mike -- Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4