Re: Embedding Python's library as zip file

2011-05-06 Thread Wojtek Mamrak
> I used py2exe in the past for that, see > http://www.py2exe.org/index.cgi/ShippingEmbedded Thanks for the advice, py2exe seems to be a great tool. Unfortunately the application stops executing at the same place. It might be the case of PIL library, I found some entries about it on py2exe site.

Re: Embedding Python's library as zip file

2011-05-06 Thread Wojtek Mamrak
> 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 tha

Re: Embedding Python's library as zip file

2011-05-05 Thread Miki Tebeka
I used py2exe in the past for that, see http://www.py2exe.org/index.cgi/ShippingEmbedded -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python's library as zip file

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 2:34 PM, Wojtek Mamrak wrote: > Maybe I am missing the point, but I think I am not able to do this. > When I remove the "Lib" folder and try to run Python.exe, the python > console window closes rapidly, so that it is hard to read any message > displayed in it and obvioulsy

Re: Embedding Python's library as zip file

2011-05-05 Thread Wojtek Mamrak
> That means it's not finding it. After startup, try adding the zip > file to your sys.path and then do "import site" at the command line, > and it should work. Maybe I am missing the point, but I think I am not able to do this. When I remove the "Lib" folder and try to run Python.exe, the python

Re: Embedding Python's library as zip file

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 4:55 AM, Wojtek Mamrak wrote: > Thanks for the reply! > >> Can you import from zip files when running the Python.exe interpreter? > When I zip the folder "Lib" into Python27.zip and later rename it and > try to run the python.exe, I receive an error: > "Import error: no modu

Re: Embedding Python's library as zip file

2011-05-05 Thread Alec Taylor
ZIP is the wrong format. Use UPX with LZMA On Thu, May 5, 2011 at 8:55 PM, Wojtek Mamrak wrote: > Thanks for the reply! > >> Can you import from zip files when running the Python.exe interpreter? > When I zip the folder "Lib" into Python27.zip and later rename it and > try to run the python.exe,

Re: Embedding Python's library as zip file

2011-05-05 Thread Wojtek Mamrak
Thanks for the reply! > Can you import from zip files when running the Python.exe interpreter? When I zip the folder "Lib" into Python27.zip and later rename it and try to run the python.exe, I receive an error: "Import error: no module named site" > Is the zip file included in sys.path? You mig

Re: Embedding Python's library as zip file

2011-05-04 Thread Ian Kelly
On Wed, May 4, 2011 at 3:09 PM, Wojtek Mamrak wrote: > 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 machi