Programatically get the version of an egg

The documentation for pkg_resources does not make it 100% obvious how to get the current version of a Python egg. To do so:

pkg_resources.get_distribution(egg_name).version