Embedding Python's library as zip file

Wojtek Mamrak tacyt1007 at gmail.com
Wed May 4 17:09:09 EDT 2011


Hello,

I spent a lot of time googling for a solution of this problem, with no
result.

I have a C++ application, in which I would like to embed Python interpreter.
I don't want to rely on an interpreter being installed on user machine,
instead I would like to distribute all the necessary files with my app.

As far as I understand, beside of my executable and Python.dll (I am using
Python27), I need to provide two folders:
 - DLLs,
 - Lib

If I place the Lib folder and the contents of the DLLs folder in a directory
of my executable, then everything seems to work.
However I would like to use a zipped Lib folder. Hence I made an archive
(which contains contents of Lib folder) called Python27.zip. Unfortunately
the app crashes during execution.
I assume the reason might be lack of zlib.pyd. Is that assumption correct?
If so, how to obtain it? If not, what am I doing wrong?

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110504/61ad35d3/attachment.html>


More information about the Python-list mailing list