A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/347291.html below:

plateform info.

plateform info. plateform info.Mike Meyer mwm at mired.org
Thu Sep 22 10:00:20 EDT 2005
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.

More information about the Python-list mailing list

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