PyFLTK - an underrated gem for GUI projects

Peter Hansen peter at engcorp.com
Sun Nov 6 23:47:07 EST 2005


Bugs wrote:
> Peter Hansen wrote:
>> The wxPython program below, py2exe'd on my machine (1.6GHz Pentium M), 
>> comes to only 12MB (2-3MB of which is Python itself), and takes 1-2 
>> seconds to load (actually less than one second after the first 
>> invocation following a fresh reboot).
> 
> And even 12MB seems heavy, unless I created my exe with py2exe 
> incorrectly...
> I created the singlefile gui demo app that comes with py2exe (test_wx) 
> and it's only 4.6MB on my WinXP machine, 3.6MB when compressed with UPX.
> Anyone else get the same results?

That's probably correct, but the singlefile option is new to me.  Can 
you provide your setup.py so we can compare?  What I used was simply this:

from distutils.core import setup
import py2exe
setup(
    windows=[dict(script='wxhello.py')]
    )

The 12MB measurement was made by looking at the Properties for the 
"dist" folder that results.

(I think using singlefile is comparing oranges and motorbikes, however, 
since it almost certainly is compressing a lot, and when the program 
runs it decompresses first.  Although practically this masks the issue, 
technically there is still probably 12MB of data involved and the OP's 
point still stands that that's quite a bit of data for a simple Hello.)

-Peter



More information about the Python-list mailing list