[Distutils] Using `pkg_resources` without importing the module

P.J. Eby pje at telecommunity.com
Mon Jul 11 00:33:04 CEST 2011

At 09:25 PM 7/10/2011 +0200, cool-RR wrote:
>I want to use `pkg_resources` to retrieve an image file from a 
>Python package. But I want to do this without importing the actual 
>package. Is this possible using `pkg_resources`, or does it import the package?

It imports the package, as it needs to know what loader object was 
used, to know whether it will be reading from a zipfile or whatever else.

More information about the Distutils-SIG mailing list