[PyQt] How to slim programs under windows

Darryl Wallace darryl.wallace at prosensus.ca
Thu May 28 16:47:10 BST 2009


Hello,
>
> I build a exe program with py2exe, and it size is about 8M.
> The program is very simple, it's a widget that contain  too lineedit 
> and a button, it's based on pyqt.
> Please is there a way to resize the file for small one.
My experience has been that if it is a gui-based PyQt program, you need 
to package the python runtime (python2x.dll), the python PyQt libraries 
(Qt.pyd, QtCore.pyd, QtGui.pyd) and the Qt dll's (QtCore4.dll, 
QtGui4.dll).  You may also need to distribute the C-runtime library 
(mingwm10.dll or msvcrXX.dll) depending on how your application was 
setup.   All of these need to be included because you can't assume the 
end user will have them on their system.

Even with your small widget developed in C++ you still need to 
distribute the Qt dll's since these are not standard windows libraries.

My conclusion: it's not possible to make your apps have super small 
download size with Qt and PyQt.

If anyone has other experiences with this please share them.

Darryl


More information about the PyQt mailing list