Hi all, I don't need zip_safe=False for open funct...
# general
f
Hi all, I don't need zip_safe=False for open functions if the file is already included in the pex, right?
e
The
open
builtin does not understand zipfile entries; so to access a file included in a PEX zipfile you'll need to use a resource API like
pkg_resources
from setuptools (https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access). If you want to use
open
then you do need
zip_safe=False
.
f
ok, thanks ^_^