>>>>> "PJE" == Phillip J Eby <pje@telecommunity.com> writes: PJE> That should probably read: | __path__ = [os.path.join(p, 'zope') for p in sys.path if | isinstance(p,StringTypes)] PJE> or else it could break in 2.3 if somebody's putting PJE> non-strings on sys.path. I don't remember exactly how the PJE> python-dev discussion turned out, but I kind of got the PJE> impression that it was going to be allowable in 2.3. Also, PJE> I'm pretty sure it will not give the expected/desired results PJE> in conjunction with zipfile imports. PJE> For these and related reasons, I would suggest that a PJE> slightly different snippet be used instead (the names are PJE> lousy, improvements welcome): | from namespace_packages import makeNamespacePath | __path__ = makeNamespacePath('zope') Random, harried thought: maybe we can use .pth files to extend the __path__? IOW, something like the above would search sys.path for zope.pth files, and do the equivalent to what site.py already does. -Barry
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