Re: Loading Resources From a Python Module/Package
Barry Warsaw <[email protected]> Mon, 2 Feb 2015 16:56:45 -0500
| Newsgroups | gmane.comp.python.import |
|---|---|
| Organization | Damn Crazy Followers of the Horn |
| Message-ID | <[email protected]> |
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. Cheers, -Barry _______________________________________________ Import-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/import-sig
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUz/KdAAoJEBJutWOnSwa/nxIQAI5JhoUiO14RGNIf4bCuzLTR xS0E/dpP54wKBnqKrgEp+zHrWbSYcL6TcaIMrsTiM5VxN3H4Y0ofeLJcU5BMgbOX zg+5OpxMCzI+7AFqLEhrzp9DoNPmaba7zeuD7XwWaGVVA9TYV3tVX9Hyp88uckqF vZ18AWk5O1/hSqhEaIHaBAuufcP6btZVZuPxeDUrD/qkU0X8iOcel4rpL0MGoOJ0 g8ZEZqRiF6b71XEPoepL3dNyo9AqGp0Ldc15UhOW2wN8ksN7PQqGFX9KV1BXNBj5 3rJuALYPhrM2Q6MdC1XX5gcVfxjEtI3gTYMKIUOivAYF/D4NXJbMN9zuYlI5yHgi ACi3s9PLEBg6CJ2THvqhzLq89JkashQBFkLQ72fpRJ1dv5n+sOQrBNV2vMEzYC5L z4Pq8HuTjkIj/ENMFuBbHsrpYEvWd76+4ukmUv33avlNotEmmXNmIZF1LNxrgQLg AMCnsiweCcU1frJtL/duFjnkluuefsNYh6drk59qyc8ZEoeJXiZOGFNimhw/lhyR n0a8+SVod+xq231lEuF+b9Yk69M88UJZHMfGu20ZMDsNdMOerEf4uijAlO5hss4O r2EM6znsXeu54+SWdQtj3Jbxs7IlG7LWsFtQJJa7H9QzLYtOxSWGD+/6/I+NeTir Vuc1aR5HlujPLBowfrcz =hBpW -----END PGP SIGNATURE-----