[Import-SIG] Loading Resources From a Python Module/Package

Barry Warsaw barry at python.org
Mon Feb 2 22:56:45 CET 2015

On Feb 02, 2015, at 11:22 PM, Nick Coghlan wrote:

>I'd prefer a helper function that can be used to easily pass a resource
>stream to the builtin open() via its opener argument, rather than
>duplicating that functionality.

I'm not sure how more useful that would be than just .decode()'ing the bytes
that get returned from resource_stream().read(), which is essentially what I
do with pkg_resources today anyway.  It's not horribly inconvenient, it could
just be nicer (IMHO).  Not a big deal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/import-sig/attachments/20150202/3ab64621/attachment.sig>

More information about the Import-SIG mailing list