[Python-Dev] PEP 273: Import Modules from Zip Archives (original) (raw)
Mark Hammond MarkH@ActiveState.com
Fri, 9 Nov 2001 14:28:18 +1100
- Previous message: [Python-Dev] PEP 273: Import Modules from Zip Archives
- Next message: [Python-Dev] switch-based programming in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[James]
But sys.prefix is obtained from a search of the directory structure for a "landmark" file, namely os.py. When the Python library is in a zip file, it is likely that no landmark files will be found, and sys.prefix will contain garbage.
Good point! :)
Since sys.prefix is searched for, its name is unpredictable. We need a known location for python22.zip. How about using the full path name of pythonXX.dll with the last three characters changed to "zip"? This associates the libraries with the DLL, which is more logical than associating them with the executable. And the file name is identical but with "zip" instead of "dll". Does this work, and solve all embedding problems?
Sounds OK to me.
Mark.
- Previous message: [Python-Dev] PEP 273: Import Modules from Zip Archives
- Next message: [Python-Dev] switch-based programming in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]