setuptools, accessing ressource files
Patrick Sabin
patrick.just4fun at gmail.com
Fri Oct 2 07:04:31 EDT 2009
I use setuptools to create a package. In this package I included some
images and I checked that they are in the egg-file. The problem is how
can I access the images in the package?
I tried pkgutil.get_data, but only got an IOError, because the EGG-INFO
directory doesn't exist.
I tried
pkg_resources.get_distribution('dist').get_metadata('images/image.png')
with a similar error (IOError)
What is the best way to access images distributed in an egg file?
-Patrick
More information about the Python-list
mailing list