How to make python24.dll smaller ?

"Martin v. Löwis" martin at
Wed Sep 14 20:04:56 CEST 2005

Stormbringer wrote:
> Final result: a 1.1 MB python24.dll which works with my frozen apps and
> is not dependent on msvcr71.dll and compressed goes to around 440 KB.
> And I'm sure that depending on the project I still could trim some more
> modules out.

If you are building yourself, anyway, I recommend an even more drastic
approach (which, alas, requires more work also): build a static library
for all the extension modules, and then use freeze to generate the
config.c. Linking it all together will bring in just those modules which
are actually referenced in config.c, and freeze will guess what modules
to put into config.c based on import statements. You might be able
to trim it further by explicitly excluding modules on the freeze command
line if you happen to know that some import statements are never
executed in your application (this is actually worthwhile for the
Python modules as well).


More information about the Python-list mailing list