On Oct 01, 2012, at 07:35 AM, Vinay Sajip wrote: >Yes, I find that odd, too. pkg_resources seems to extract files from zip into >a cache folder, then returns filenames from the location in the cache; it >seems a lot of trouble to go to just to be able to deliver a filename.
Darn handy though when interacting with some APIs which require filenames. >In the Resource that I implemented in distlib, I have the "path" attribute of >a resource which is analogous, though it's not directly usable as a file path >for resources in a zip. However, since the resource is available as bytes or >a stream, those applications which really need a filename (perhaps to pass to >a third-party API which expects a filename) can handle that themselves, >e.g. by saving the bytes to a temporary location and passing that to whatever >needs a filename. Why not provide this by distlib? -Barry _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
