At 11:40 PM 1/30/04 +0000, Armin Rigo wrote: >A more radical point of view is that these sys.path hacks are here not because >of a missing feature, but on the contrary to work around the way Python tries >to isolate me from the "messiness out there" (the file system) by mapping it >into a neat language construct (packages). Without that, various kinds of "hacks" such as importing from DLLs/.so's, zipfiles, frozen modules, py2exe, PYTHONPATH, and the like, would not be practical. These use cases alone are enough to make me -1 on adding explicit paths into the module system from within code. I'm *much* more interested in making non-module (but "read-only") files available through the package/module abstraction, than in breaking the abstraction to specify directories. For example, in PEAK I've implemented both a utility function ('fileNearModule("some.module","relative/path")') and a URL scheme ('pkgfile:some.module/relative/path') to support this.
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