<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Wingdings 2";
        panose-1:5 2 1 2 1 5 7 7 7 7;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all python programmers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have spent a day and a half researching options for GUI development in python, this includes getting a friend that has some good contacts in the open development world to find some information for me and I have now been looking into two
separate solutions, PyQT and Glade<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PyQT has been mentioned before on the edulist, is the python implementation of the QT frame work. Glade is a GUI designer for PyGTK which is the python implementation of the GTK+ frame work. Both GTK and QT are well documented and supported,
but if I have to pick a python implementation I would probably go for PyGTK as is seems to have better support, PyQT has been passed around between three different companies and the documentation shows this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Both PyQT and PyGTK have all in one installers, that come with all required libraries as well as designers. I have included the links below, beware that you will need python 2.7 for PyGTK. I had no issues install and running both PyQT and
PyGTK.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">All in one installers.<o:p></o:p></p>
<p class="MsoNormal">PyQT:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.riverbankcomputing.com/software/pyqt/download">http://www.riverbankcomputing.com/software/pyqt/download</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PyGTK:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.pygtk.org/downloads.html">http://www.pygtk.org/downloads.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now for the part you might actually want to read. How well do they work. I managed to get a simple adding program working in less than an hour for both solutions but I prefer PyGTK over PyQT. The designger for PyGTK is called Glade I found
it easier to use then the default designer that comes with PyQT, Glade has a better layout and it was easier to find and change properties for the widgets as well as changing the layout. They both work the same way and look relatively the same so designer
choice is personal preference. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Both PyQT and Glade work in the same way when it comes to getting the coding to work. The designers create a custom XML file that you then have to connect the code to. In this part of the GUI development I prefer PyGTK greatly over PyQT.
In PyGTK you can link directly to the XML file and the build process as well as create the code to handle the GUI events (called signals) was a lot easier to understand compared to PyQT. In PyQT you cannot link directly to the XML file, you have to first create
a python file using a batch file include with the PyQT installation, this means any time you change your interface you have to rerun the batch file. I have attached the code for both solutions to this email, if you want to run the GUI you will need to make
sure you have PyQT and PyGTK installed. Currently the code is undocumented. I will create tutorials for both PyQT and PyGTK later on in the holidays.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For reference this is what I based my work on:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.overclock.net/t/342279/tutorial-using-python-glade-to-create-a-simple-gui-application">http://www.overclock.net/t/342279/tutorial-using-python-glade-to-create-a-simple-gui-application</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you are looking for a GUI designer program in python that lets you edit the code directly through the program (like visual studios or eclipse) you are out of luck all solutions that I could find require you to do your coding separately
from the GUI designer, but hey at least you don’t have to code the GUI. The problem with python although it is a great language to teach programming it is a scripting language not really designed for GUI applications. A part of my thinks I might teach python
in year 11 but ignore GUIs and in year 12 get the students on to a language that has better GUI support, reason being I feel that GUIs aren’t necessary for teaching the basic of programming they just add an extra layer of complexity.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That was a lot of words and I hope someone reads it. If you have any questions feel free to ask.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ben.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt;color:#17365D;mso-fareast-language:EN-AU">Benjamin Baas<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;color:#1F497D;mso-fareast-language:EN-AU"><img border="0" width="32" height="27" id="Picture_x0020_1" src="cid:image001.png@01D0B328.726304A0" alt="Description: cid:image001.png@01C9CA67.50F474D0"></span><b><span style="font-size:10.0pt;color:#948A54;mso-fareast-language:ZH-CN"> </span></b><b><span style="font-size:12.0pt;color:#17365D;mso-fareast-language:ZH-CN">Alkira
Secondary College</span></b><b><span style="font-size:10.0pt;color:#17365D;mso-fareast-language:ZH-CN"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:Wingdings;color:#17365D;mso-fareast-language:ZH-CN">+</span><span lang="EN-US" style="font-size:9.0pt;color:#17365D;mso-fareast-language:ZH-CN">
<b>Nurture Ave, Cranbourne North | PO Box 4314, Narre Warren South 3805</b></span><span style="font-size:9.0pt;color:#17365D;mso-fareast-language:ZH-CN"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Wingdings 2";color:#17365D;mso-fareast-language:ZH-CN">'</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:ZH-CN">
</span><b><span lang="EN-US" style="font-size:9.0pt;color:#17365D;mso-fareast-language:ZH-CN"> +61 3 5991 3500
</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Wingdings 2";color:#17365D;mso-fareast-language:ZH-CN">6
</span><b><span lang="EN-US" style="font-size:9.0pt;color:#17365D;mso-fareast-language:ZH-CN">+61 3 5991 3599
</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:Wingdings;color:#1F497D;mso-fareast-language:ZH-CN">8<b>
</b></span><span style="color:black;mso-fareast-language:ZH-CN"><a href="http://www.alkirasecondarycollege.com.au/"><b><span lang="EN-US" style="font-size:9.0pt;color:#548DD4">www.alkirasecondarycollege.com.au</span></b></a></span><b><span lang="EN-US" style="font-size:9.0pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p></o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-size:8.0pt;color:#404040;mso-fareast-language:ZH-CN">Alkira Secondary College believes in
</span></i><i><span style="font-size:8.0pt;color:red;mso-fareast-language:ZH-CN">Personalised</span></i><i><span style="font-size:8.0pt;color:#404040;mso-fareast-language:ZH-CN"> learning for all, and
</span></i><i><span style="font-size:8.0pt;color:red;mso-fareast-language:ZH-CN">Respect</span></i><i><span style="font-size:8.0pt;color:#404040;mso-fareast-language:ZH-CN"> for the individual<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p></p><p><b>Important - </b>This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Training.</p>
</body>
</html>