Thanks for the feedback. >> - The __path__ vrbl in a package 'foo.bar' loaded from zipfile.zip >> will have the value ['zipfile.zip!foo/bar'] and this same syntax can >> also be used when adding entries to sys.path and __path__. > >__path__ is set to the package name. I'm not sure of the exact >rationale for this (Just did the package support) but it seems to work >fine. I think the result of the Mac implementation is that the package hierarchy and the folder structure in the archive must match. Normally this is the case but changes to __path__ can cause sub-modules to loaded from somewhere else. I'm guessing such changes to to __path__ isn't considered on Mac when importing from an archive. [Just] >I don't know the rationale either (or at least: not anymore ;-), I just copied >the behavior of frozen packages (as in freeze.py) from import.c. >PyImport_ImportFrozenModule() contains this snippet: Dynamic changes to __path__ is probably not needed for frozen packages. It may not even be needed for imports from zipfile. My first attempt of adding this feature did not support changes to __path__. regards, finn
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4