[Distutils] Getting an egg's version: better way?

Rob Cakebread cakebread at gmail.com
Thu Mar 15 16:20:33 CET 2007


On 3/15/07, Nathan R. Yergler <nathan at yergler.net> wrote:
> I have a situation where I want to get the version of an egg that's
> installed.  I figured out the following, but wanted to know if I'm
> missing something obvious that's easier::
>

Assuming you just have one version installed:

>>> from pkg_resources import Environment
>>> e = Environment()
>>> print e["cctagutils"][0].version


More information about the Distutils-SIG mailing list