[PyQt] Porting PyQt GUI between platforms.
akabaila at pcug.org.au
Tue Aug 3 04:56:19 BST 2010
On Tuesday 03 August 2010 11:24:17 Juan Manuel Santos wrote:
> From: Algis Kabaila <akabaila at pcug.org.au>
> To: pyqt at riverbankcomputing.com
> Date: Monday 02 August 2010
> > Hi,
> > To help my 24 yr old grandson to plan his finances, I wrote a little
> > Python script. It appears that the CLI is not acceptable to a modern MS
> > Window user. So I've added a simple PyQt GUI to it in my Linux platform
> > (kubuntu 10.04).
> > I now need to port it to MS Windows, probably to the Win XP version. Can
> > you help me to get started? What are the references for the process?
> > I would greatly appreciate some guidance,
> > OldAl.
> I've never actually ported a PyQT program to Windows, but I did so with
> PyGTK programs, and the general steps should be the same:
> 1. Have Python installed on the Windows PC (which I believe you already
> have), together with any additional Python modules you may be using
> 2. Install PyQt for Windows (tentatively from here:
> http://www.riverbankcomputing.co.uk/software/pyqt/download ).
> As I said, I have never actually done so, but if the PyQt installer bundles
> Qt as the webpage says it does, probably with those two you are all set.
> Otherwise you may need to append the Qt path to the environmental PATH
> variable, like GTK on Windows needs, but let's leave that for the end in
> case the former does not work :).
> After installing those two you can try running the exact PyQt program you
> were developing on Linux, on your Windows box. Why don't you give it a try
> and post some results?
> Additionally, if you have a Windows box to spare in which you can install
> all that was mentioned above, you can create an executable for the
> application with py2exe, thus removing any further dependencies on Python
> or Qt (if properly configured, py2exe outputs an executable which can be
> run in any Windows machine).
> Good luck
> Juan Manuel Santos
I've tried your first suggestion and just took the script and the gui to a
windows box and ran the python starting script. It just worked!
I am thrilled and astonished - never thought it could be that easy!
Of course, it is only a small script - my old box had QT 4.3.x, with the
designer and the rest of the tools. I wonder what is the minimum Qt
installation required to run small scripts with gui?
I do have a VM (Virtual Machine) with Win2000 on my PC, so will use it to find
out what Qt installation will allow the script to run there. I have not tried
the py2exe, but will do so RSN.
Thank you for your reply and pointing me in the right direction. Gratefully,
More information about the PyQt