>>> import sys >>> from pkg_resources import find_distributions >>> def print_distributions(path): ... dists = find_distributions(path, True) ... for dist in dists: ... print dist ... >>> for path in sys.path: print_distributions(path) ... z3c.autoinclude 0.2.1 zc.buildout 1.0.1 zope.schema 3.4.0 zope.configuration 3.4.0 zope.interface 3.4.1 zope.dottedname 3.4.2 setuptools 0.6c8 zope.testing 3.5.1 zope.event 3.4.0 zope.i18nmessageid 3.4.3 zope.deprecation 3.4.0 WebHelpers 0.2.1 Routes 1.5