from distutils.sysconfig import get_python_lib; print get_python_lib()
返回:/usr/lib/python2.6/site-packages
列出已安裝的python站點包?
import sys; print sys.path
返回:['', '/usr/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg', '/usr/lib/python2.6/site-packages/pip-0.6.3-py2.6.egg', '/usr/lib/python2.6/site-packages/TRML2PDF-1.0-py2.6.egg', '/usr/lib/python2.6/site-packages/django_threaded_multihost-1.3_3-py2.6.egg',...............
但如何從安裝在站點包列出了 「導入的名字」? E.g:(前導入結果)django, pip, trm2pdf....
感謝。
忽略我的近距離投票:有一個實質性的差異(讀得太快) – ChristopheD 2010-02-20 10:44:26
你試過[Stallion](http://pyevolve.sourceforge.net/wordpress/?p=2200)? – Tarantula 2012-02-08 15:21:11