473,473 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Zipping python modules

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
Jun 27 '08 #1
2 1057
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
Jun 27 '08 #2
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
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
1
by: durumdara | last post by:
Hi! As I experienced in the year 2006, the Python's zip module is not unicode-safe. With the hungarian filenames I got wrong result. I need to convert iso-8859-2 to cp852 chset to get good...
0
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.