[Tutor] Has anyone ever tried to convert the textual output ofthe dis module to another language

Alan Gauld alan.gauld at freenet.co.uk
Mon Apr 18 02:06:44 CEST 2005


> #1 - MUCH MUCH MUCH smaller exes. Speed is not an issue to me, but
> filesize is. Have you ever compiled "Hello world" in a new language,
> and found that the exe was 100K+, when it really only needs to be
less
> than 1K?

It is occasionally possible to get such small exes - it used to be
possibly on DOS by compiling to a COM file rather than EXE - but
that's only possible because of the huge size of the library files.
Have you looked at the standard C libraries? On my cygwin install
libc is nearly 800K and libstdc++ is just under 1M...
If you statically link a C program to its libraries it grows rapidly.

The same happens with Python, most python programs in .pyc form)
are quite small, it's the interpreter and library that takes up
the space. So if it's space you are concerned with don't compile
just leave them as .py or .pyc...

> And py2exe... I am not averse to using it, but 800 - 1000K+
> exes, well, it's just my pet peeve.

Yep, which is why I distribute as .pyc and the interpreter
is optional... But it does need savvy users. Otherwise py2exe
keeps the techno-phobes happy and disks are cheap these days...

Alan G.



More information about the Tutor mailing list