[Tutor] Re: Making Smaller Executables with Simple.py?
Sat, 11 Nov 2000 12:23:26 -1000
> > OK, I've used the following to create an executable
> without a console:
> > python simple.py script.pyw -tk
> > My original Script file is only 6KB after running simple.py
> I have over
> > 1.5MG, how can I streamline this or is there another
> (easy:-) way to create
> > an .exe
[to which Daniel Yoo replied:]
> The problem with making Python binaries is that Simple.py
> needs to include
> enough of the runtime system to work. Unfortunately, the
> runtime system
> is itself a little large, and that's probably the part that's
> taking up the most space.
> Unless your friends are willing to install Python, I'm not
> sure if there's
> any way of getting around the large binary size.
Exactly. But consider that alternative. The Python 2.0 download is about
5.5 MB and seems to expand to fill almost 18 MB. Your 1.5MB seems
reasonable in comparison.
I may be wrong, but I thing what Gordon's installer does is strip as much in
the way of unused libraries as it can before packaging things. It may be
possible to do better by compiling a more stripped down core Python than the
standard distribution, keeping only those things you need. I doubt this
would be worth the time. At any rate, as you build bigger and more
complicated programs to package, your distribution size shouldn't increase
all that much.