Embedding Python's library as zip file

Wojtek Mamrak tacyt1007 at gmail.com
Fri May 6 06:10:33 EDT 2011


> Are you calling Py_SetProgramName?  That may help to set sys.prefix
> and sys.exec_prefix.  However, looking at site.py, it appears that
> it's only looking for proper directories.  I don't think it will be
> able to add a site-packages inside a zip archive at all; you will just
> have to add that yourself.

Yes, I have tried Py_SetProgramName, but I am even not sure what
argument (name, path?) should be passed to it and how it will affect
the application.


Some good news.
After simplifying my application I realized, that importing of modules
from the zip archive works well, I only have to add site-packages to
sys.path (it looks like "python27.zip/site-packages").

Unfortunately even though I can import Image package, something still
causes applications' sudden death. I will try to figure out what is
the reason of that. As I said, the only non-standard package I am
using is PIL.



More information about the Python-list mailing list