exporting imports to reduce exe size?

Ron_Adam radam2_ at _tampabay.rr.com
Tue Apr 12 10:54:05 EDT 2005


In looking at ways to reduce the size of exe's created with py2exe,
I've noticed that it will include a whole library or module even if I
only need one function or value from it.  

What I would like to do is to import individual functions and then
export 'write' them to a common resource file and import that with
just the resources I need in them.

Has anyone tried this?  

I'm considering using pickle to do it, but was wondering if this is
even a viable idea?  

Is it possible to pickle the name space after the imports and then
reload the name space in place of the imports later?

Cheers, 
Ron




More information about the Python-list mailing list