
What's the correct way to get access to files in the .egg-info directory (where I'm putting some custom configuration files)? I got this far: req = pkg_resources.Requirement('ProjectName') pkg_resources.resource_string(req, 'filename') But that gives me access to the base dir of the project, not the .egg-info dir.

At 12:17 PM 7/29/2005 -0500, Ian Bicking wrote:
dist = get_provider(req) contents = dist.get_metadata('some_filename_in_egg_info') See IMetadataProvider for the other methods you can use on metadata, such as has_metadata(), metadata_isdir(), metadata_listdir(), etc. Distributions support both IMetadataProvider and IResourceProvider, if they were created with an appropriate metadata object. (i.e, they're ones created by find_distributions() and its kin, as opposed to ones that are just links found on a web page.)

At 12:17 PM 7/29/2005 -0500, Ian Bicking wrote:
dist = get_provider(req) contents = dist.get_metadata('some_filename_in_egg_info') See IMetadataProvider for the other methods you can use on metadata, such as has_metadata(), metadata_isdir(), metadata_listdir(), etc. Distributions support both IMetadataProvider and IResourceProvider, if they were created with an appropriate metadata object. (i.e, they're ones created by find_distributions() and its kin, as opposed to ones that are just links found on a web page.)
participants (2)
-
Ian Bicking
-
Phillip J. Eby