How to create a single executable of a Python program

Larry Bates larry.bates at websafe.com
Wed Jul 25 13:20:36 EDT 2007


NicolasG 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.
> 
You need to tell us why you "think" you need this and perhaps we can make a
suggestion.  Question: Have you installed ANY applications recently that
consisted of only a single file on your hard drive?  Answer: No.  Most
applications install many (sometimes hundreds) of files.  So what is the
problem.  If you want a single file to distribute, look at Inno Installer.  Use
it to make a single, setup.exe out of all the files that come out of py2exe
along with documentation, shortcuts, etc. that a good modern application needs.

-Larry



More information about the Python-list mailing list