Zipping python modules

Allen brian_vanderburg2 at yahoo.com
Wed Jun 18 01:31:39 EDT 2008


Larry Bates wrote:
> Brian Vanderburg II wrote:
>> I've installed Python 2.5 on MSW and it works.  I'm preparing it to 
>> run from a thumb drive so I can run applications by dropping them onto 
>> the python.exe or from command line/etc.  It works but the size is 
>> quite large.  I've compressed most of the executables with UPX even 
>> the dlls under site-packages, but is there a way I could compress the 
>> top-level 'lib' directory into a python.zip instead so save some 
>> space, and do I need the 'test' directory (which is about 10MB itself)?
>>
>> Brian Vanderburg II
>>
>>
> With thumb drives now being 2-4Gb what possible need would there be to 
> worry about 10Mb?  Remember by zipping things you are trading 
> performance for size as well.
> 
> -Larry

My python 'portable' version is about 150 MB (wxPython, PyQT, and a few 
others), but I'm going to purchase one of those nice pocket hard drives 
with plenty of space :)  I did remove the *.pyo files for the install 
for now and just let the scripts use the *.pyc, and most of the test 
suites which I assume are use only when building/testing the extensions 
so I probably won't need at runtime hopefully.

Brian Vanderburg II



More information about the Python-list mailing list