[PyQt] PyQt 4.7 and py2exe error

Giovanni Bajo rasky at develer.com
Tue Feb 9 17:40:49 GMT 2010


Il giorno mar, 09/02/2010 alle 08.51 -0800, Scott Ballard ha scritto:
> Does that work for the .ui files as well? I haven't been able to get 
> py2exe to compile successfully if it includes a .ui. Instead I've had to 
> convert the .ui file using pyuic4 to a python file and import it from there.
> 
> Any tips or tutorials for using .ui files with py2exe or pyInstaller?

Depends on what you want to achieve. One self-contained and non-invasive
solution would be:

1) Change your code so that .ui are read from Qt resources.
2) Bundle the resource file as data file with PyInstaller (see manual)
3) At startup, load the resource file from the temporary directory (see
manual)

-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com




More information about the PyQt mailing list