Back to PyQT

Today I got back to developing up an application using PyQT4.

1) Creating a .exe file using py2exe

You need to have py2exe installed. Using pythonxy means that everything is in place so that’s good. The setup file that I used had the following in it:

from distutils.core import setup
import py2exe

setup(
        windows=[{"script" : "FindPyTab.pyw"}],
        options={"py2exe" : {
            "includes" : [
            # Needed only for Qt-based applications:
            'sip','PyQt4.Qt',
            # Needed only for matplotlib-based applications:
            #'matplotlib.numerix.ma','matplotlib.numerix.fft','matplotlib.numerix.linear_algebra','matplotlib.numerix.mlab','matplotlib.numerix.random_array'
            ]
        }}
    )

where the file to be converted is FindPyTab.pyw

Then fire up a cmd window and navigate to the directory that holds the pyw file. Run

 python setup.py py2exe 

if there there are any error then these are probably related to missing dll files. I had to download msvcp90.dll from the web into the same directory as the pyw file to be changed. Then lots of output is written to screen and you should end up with 2 directories placed in the pwd which contain everything required to distribute the exe.

2) Creating better input and output

I have redesigned the interface and have worked out how to write the logfiles to the text browser. I have spent a lot of time trying to work out how to place a hyperlink into the table and still don’t quite get how to do that.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

A WordPress.com Website.

Up ↑

%d bloggers like this: