I've produced a python egg using setuptools and would like to access it's metadata at runtime. I currently got working this:
import pkg_resources
dist = pkg_resources.get_distribution("my_project")
print(dist.version)
but this would probably work incorrectly if I had multiple versions of the same egg installed. And if I have both inst...
I'm trying to get a package installed on Google App Engine. The package relies rather extensively on pkg_resources, but there's no way to run setup.py on App Engine.
There's no platform-specific code in the source, however, so it's no problem to just zip up the source and include those in the system path. And I've gotten a version of ...
I heard about Distribute's pkg_resources. I want it to organize resources such as images in my project. Is there a good tutorial on how to use it?
...
We have a common python installation for all of our systems in order to ensure every system has the same python installation and to ease configuration issues. This installation is located on a shared drive. We also have multiple platforms that share this installation. We get around conflicting platform-specific files by setting the --...
I am trying to compile and install python2.6.4 on Debian 5.0.3 (64bit). I installed using 'make altinstall' as I want to keep python 2.5.2 that comes with Deb5.0 as my default python.
Following this, I installed setuptools 0.6c11 using the command 'sudo sh setuptools-0.6c11-py2.6.egg --prefix=/usr/local'. However, after installing when ...
Hi - I am processing a CSV file and have the following working code:
reader = csv.reader(open(filename, 'rU'), dialect='excel')
header = reader.next()
However, to be compatible with elsewhere in the codebase, I need to use a file object using pkg_resources.resource_stream, as follows:
fileobj = pkg_resources.resource_stream('foo', 't...