How to create a single executable of a Python program

kyosohma at gmail.com kyosohma at gmail.com
Wed Jul 25 15:11:47 CEST 2007


On Jul 25, 6:38 am, Ali <aafs... at gmail.com> wrote:
> On Jul 25, 7:34 am, NicolasG <nicol... at gmail.com> wrote:
>
> > Dear fellows,
>
> > I'm trying to create a executable file using py2exe . Unfortunately
> > along with the python executable file it also creates some other files
> > that are needed in order to the executable be able to run in a system
> > that doesn't have Python installed. Can some one guide me on how can I
> > merge all this files created by py2exe in a single exe file ? If I
> > have a python program that uses an image file I don't want this image
> > file to be exposed in the folder but only to be accessible through the
> > program flow..
>
> > Regards,
> > Nicolas.
>
> Hi,
>
> I know this is not exactly what you asked for, but if you want a
> single exe installer, then take a look at something like Inno Setup.http://www.jrsoftware.org/isinfo.php
>
> It will package all that stuff into a single exe which Windows users
> seem happy to click-and-install.
>
> I blogged the process I use here:http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-fo...
> (though this has some PyGTK specifics)
>
> Ali

I've been using GUI2Exe, which is a GUI interface to py2exe. Anyway,
with it, I've been able to reduce the number of files it compiles down
to 3. The main executable, MSVCR71.dll and w9xpopen.exe. Then I use
Inno Setup to create an installer executable. Inno can determine if
any of the dlls you include are already installed and if not, install
them for you.

Gui2exe can be found here: http://xoomer.alice.it/infinity77/eng/GUI2Exe.html

Hope that helps.

Mike




More information about the Python-list mailing list