Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Choosing GUI Module for Python

87 views
Skip to first unread message

Antony

unread,
Nov 8, 2009, 11:49:13 PM11/8/09
to
Hi all
I just wanted to know which module is best for developing designing
interface in python .
i have come across some modules which are listed here . please tell
your suggestions and comments to choose best one
1. PyGTK
2. PyQT
3. PySide
4. wxPython
5 . TKinter

Also i need to know is there any IDE for developing these
things . . .

r

unread,
Nov 9, 2009, 1:49:19 AM11/9/09
to

You may want to offer a little more info, like what exactly you are
looking to do with such GUI. are your needs for a VW, Corvette, or
Mercedes? etc, etc. All these kits have pros and cons, some better for
this some for that, yadda yadda

Antony

unread,
Nov 9, 2009, 3:59:33 AM11/9/09
to

I would like to know about that pros and cons only ...

sste...@gmail.com

unread,
Nov 9, 2009, 9:21:33 AM11/9/09
to Antony, pytho...@python.org

On Nov 9, 2009, at 3:59 AM, Antony wrote:
>>
>> You may want to offer a little more info, like what exactly you are
>> looking to do with such GUI. are your needs for a VW, Corvette, or
>> Mercedes? etc, etc. All these kits have pros and cons, some better
>> for
>> this some for that, yadda yadda
>
> I would like to know about that pros and cons only ...

What might be a "pro" for one use case could easily be a "con" for
another.

For example, Kit-X may be infinitely configurable to run on everything
from 800x600 to 1680x1050 pixel monitors with full viewport control,
full zoom, pan, etc. and requires that all those cases be handled
with correct configuration.

That's great if you're writing an application that requires that.

But, if you're writing a Pref Pane for OS X, which will never be any
bigger than the pref-pane window and will only run on OS X, that
particular kit might be a huge waste of time.

The "pro" of infinite flexibility becomes a huge "con" for the OS X
Pref Pane use-case.

S

Kevin Walzer

unread,
Nov 9, 2009, 10:02:48 AM11/9/09
to

r

unread,
Nov 9, 2009, 1:43:22 PM11/9/09
to
On Nov 9, 3:59 am, Antony <anthonir...@gmail.com> wrote:
> I would like to know about that pros and cons only ...

I'll reiterate what i have said and others have said. WE NEED MORE
INFO TO PROPERLY GUIDE YOU!!!

Survey: What GUI is right for you?

1. What is your level of GUI programming? (0 1 2 3 4 5)
2. Will you be using this GUI for your own apps or distributing the
apps?
3. What is the primary OS that this app will be used on (or any)?
4. What type of app (graphics(2D/3D), texteditor, hello world)?
5. Are themes/customizable look and feel important?
*. You mentioned IDE's. That of course will narrow your choice pool
substantially.

Tkinter:
+Is included in Python as a built-in module!
+very easy to learn!
+adequate docs!
-lacks professional appearance
-lacks many important widgets
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
http://effbot.org/tkinterbook/

wxPython:
+larger richer widget set than tk!
+better look and feel than tk!
+opengl canvas built-in!
-not as easy to learn as tk
-docs are lacking at best (i really wish this were better!)
-not built-in to Python (rightly so, too big!)


i won't comment on the others. If you have absolutely no experience
try out Tkinter just to a feel for GUI in a hand holding environment.
If you are not happy with Tkinter's simplicity then move on to a full
featured GUI kit if you need the more advanced stuff. I would say try
them all! I would also suggest you learn to code GUI's without an IDE.
I think the experience is more rewarding. You should know every bit of
code you create personally!

Dave Cook

unread,
Nov 9, 2009, 2:55:35 PM11/9/09
to
On 2009-11-09, Antony <antho...@gmail.com> wrote:

> 1. PyGTK
> 2. PyQT
> 3. PySide
> 4. wxPython
> 5 . TKinter

For cross-platform work, I'd choose either PyQt or wxPython.

If you're not too worried about the dual license, I find PyQt the best
combination of ease of use and features, particularly when used with
Qt Designer.

For commercial work, I'd use wxPython, which has a very liberal
license. It's fairly featureful, but not very pleasant to use.

Dave Cook

Simon Hibbs

unread,
Nov 9, 2009, 3:01:51 PM11/9/09
to
Having tried most of the options out there, personaly I've settled on
two.

I use Tkinter for ver simple GUIs such as single dialog boxes or
results displays. The advantage of it being built-in to Python
outweighs it's limitations.

For anything more complex, I go for PyQT every time. QTDesigner is a
full drag-and-drop GUI builder that rivals Visual Studio, and PyQT
comes with a script to convert QTDesigner XML files into Python code,
which you then subclass in your own script and attach your own code to
the GUI widgets. There's a longer learning curve than Tkinter, but
it's very much worth it for access to QTs mature and rich framework,
with excellent professional-class documentation. Sorry, but wxWidgets
which I have used doesn't come anywhere close.

The main objection to using PyQT untill now was that for commercial
development you needed to buy a license (it was free for GPL
projects). That's rapidly becoming a non-issue as the core QT
framework is now LGPL and Nokia have a project underway to produce
PyQT compatible LGPL python bindings under the PySide project.

Simon Hibbs

Grant Edwards

unread,
Nov 9, 2009, 3:07:14 PM11/9/09
to

NB: One thing to I've noticed about wxPython is that if you
follow the rules carefully, the cross-platform behavior
consistency is pretty decent. However, if you're not careful,
it's easy to do something the "wrong" way and have it still
work fine on one platform, but not on another. During
development, you need to test frequently on all the platforms
you care about. If you wait until the end to test on that
second/third platform, you may have accumulated enough minor
problems that it becomes a real chore to try to figure them all
out.

--
Grant Edwards grante Yow! Why don't you ever
at enter any CONTESTS,
visi.com Marvin?? Don't you know
your own ZIPCODE?

Lorenzo Gatti

unread,
Nov 10, 2009, 5:40:52 AM11/10/09
to
On Nov 9, 9:01 pm, Simon Hibbs <simon.hi...@gmail.com> wrote:

> The main objection to using PyQT untill now was that for commercial
> development you needed to buy a license (it was free for GPL
> projects). That's rapidly becoming a non-issue as the core QT
> framework is now LGPL and Nokia have a project underway to produce
> PyQT compatible LGPL python bindings under the PySide project.

I also would like to use PySide, but unlike PyQt and Qt itself it
doesn't seem likely to support Windows in the foreseeable future. A
pity, to put it mildly.

Regards,
Lorenzo Gatti

Simon Hibbs

unread,
Nov 10, 2009, 5:08:14 PM11/10/09
to
On 10 Nov, 10:40, Lorenzo Gatti <ga...@dsdata.it> wrote:

> I also would like to use PySide, but unlike PyQt and Qt itself it
> doesn't seem likely to support Windows in the foreseeable future. A
> pity, to put it mildly.

It's not been ruled out. They don't officialy support the Mac either,
but according to posts on the mailing list a independent developer has
got it working in MacOS X at some level. Since QT runs on Windows,
porting to the Windows version of QT shouldn't be hard.

PySide is for the future, not the present, but it gives me a lot more
confidence in using and recomending PyQT to know that there is so much
work being put in to make sure it has a great future.

Simon Hibbs

Antony

unread,
Nov 10, 2009, 9:26:48 PM11/10/09
to

Thanks All
I have got an idea,the way i need to choose GUI module in Python ,
As "r" said i am going to start from tkinter without any IDE .
if i need any advanced feature then i will move on to some other
module....
First i have to try the code ...

Lorenzo Gatti

unread,
Nov 11, 2009, 3:48:26 AM11/11/09
to
On Nov 10, 11:08 pm, Simon Hibbs <simon.hi...@gmail.com> wrote:

> Since QT runs on Windows,
> porting to the Windows version of QT shouldn't be hard.

The PySide developers, who are better judges of their own project than
you and me, consider a Windows port so hard (and time consuming) that
they didn't even try; a second iteration of the already working
binding generator has a higher priority than supporting a large
portion of the potential user base with a Windows port, so don't hold
your breath.

On a more constructive note, I started to follow the instructions at
http://www.pyside.org/docs/pyside/howto-build/index.html (which are
vague and terse enough to be cross-platform) with Microsoft VC9
Express.
Hurdle 0: recompile Qt because the provided DLLs have hardcoded wrong
paths that confuse CMake.
How should Qt be configured? My first compilation attempt had to be
aborted (and couldn't be resumed) after about 2 hours: trial and error
at 1-2 builds per day could take weeks.

Regards,
Lorenzo Gatti

Lorenzo Gatti

unread,
Nov 12, 2009, 5:34:04 AM11/12/09
to
On Nov 11, 9:48 am, Lorenzo Gatti <ga...@dsdata.it> wrote:

> On a more constructive note, I started to follow the instructions athttp://www.pyside.org/docs/pyside/howto-build/index.html(which are


> vague and terse enough to be cross-platform) with Microsoft VC9
> Express.
> Hurdle 0: recompile Qt because the provided DLLs have hardcoded wrong
> paths that confuse CMake.
> How should Qt be configured? My first compilation attempt had to be
> aborted (and couldn't be resumed) after about 2 hours: trial and error
> at 1-2 builds per day could take weeks.

Update: I successfully compiled Qt (with WebKit disabled since it
gives link errors), as far as I can tell, and I'm now facing
apiextractor.

Hurdle 1a: convince CMake that I actually have Boost headers and
compiled libraries.
The Boost directory structure is confusing (compiled libraries in two
places), and CMake's script (FindBoost.cmake) is inconsistent (should
I set BOOST_INCLUDEDIR or BOOST_INCLUDE_DIR?), obsolete (last known
version is 1.38 rather than the requisite 1.40) and rather fishy (e.g.
hardcoded "c:\boost" paths).
Would the Cmake-based branch of Boost work better? Any trick or recipe
to try?
Hurdle 1b: the instructions don't mention a dependency from libxml2.

Lorenzo Gatti

catal...@gmail.com

unread,
Nov 13, 2009, 3:06:20 AM11/13/09
to
Tkinter is deafult on python .
Is more easy to use any editor text (geany).
I donțt see a good IDE for GUI

Dylan Palmboom

unread,
Nov 13, 2009, 4:40:57 AM11/13/09
to pytho...@python.org
-----Original Message-----
From: catal...@gmail.com [mailto:catal...@gmail.com]
Sent: 13 November 2009 10:06 AM
To: pytho...@python.org
Subject: Re: Choosing GUI Module for Python

Tkinter is deafult on python .
Is more easy to use any editor text (geany).

I don?t see a good IDE for GUI


On Nov 9, 6:49 am, Antony <anthonir...@gmail.com> wrote:
> Hi all
>    I just wanted to know which module is best for developing designing
> interface in python .
> i have come across some modules which are listed here . please tell
> your suggestions and comments to choose best one
>  1. PyGTK
>  2. PyQT
>  3. PySide
>  4.  wxPython
>  5 . TKinter
>
> Also i need to know is there any IDE for developing these things . . .


PyQt is an excellent toolkit for us at work. It has nice documentation and
very easy to learn.
We use Eclipse IDE at work with the PyDev workspace loaded for the coding.
Eclipse has nice features for integration with subversion all from one
place,
so it makes it more manageable when you have more than 1 person working on a
project.
There's only 2 of us here working together, but the subversion integration
makes
our lives so much easier.

We use eclipse for gui design in code or we use Qt Creator which is very
intuitive to use if you want to design a gui visually. Also, there's a
python script we use
called MakePyQt that you can find here: http://www.qtrac.eu/pyqtbook.tar.gz
to convert the ui files from
Qt Creator to python files. Then all you need to do is implement these
generated python
files in your program and add functionality etc.

Aahz

unread,
Nov 13, 2009, 11:44:58 PM11/13/09
to
In article <c772b537-5f95-4a1b...@i12g2000prg.googlegroups.com>,

Antony <antho...@gmail.com> wrote:
>
> I just wanted to know which module is best for developing designing
>interface in python .

Haven't tried it, but a new release was just announced for this:

http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

[on old computer technologies and programmers] "Fancy tail fins on a
brand new '59 Cadillac didn't mean throwing out a whole generation of
mechanics who started with model As." --Andrew Dalke

sturlamolden

unread,
Nov 14, 2009, 7:39:20 AM11/14/09
to
On 9 Nov, 05:49, Antony <anthonir...@gmail.com> wrote:

>    I just wanted to know which module is best for developing designing
> interface in python .

I personally feel the wxPython support in the 3.1 beta of
wxFormBuilder makes the choise rather simple. It generates a Python
file with classes for all WYSIWYG GUI forms/windows/dialogs. Then in
our Python code, we just import and inherit the form, and implement
the event handlers. It can't be done easier. GUI programming with
Python is now comparable to programming with VB, Delphi or C#. I am
using it for all my projects now. It just feels right.

Dietmar Schwertberger

unread,
Nov 14, 2009, 9:35:35 AM11/14/09
to
sturlamolden schrieb:

> I personally feel the wxPython support in the 3.1 beta of
> wxFormBuilder makes the choise rather simple. It generates a Python
> file with classes for all WYSIWYG GUI forms/windows/dialogs. Then in
> our Python code, we just import and inherit the form, and implement
> the event handlers. It can't be done easier. GUI programming with
> Python is now comparable to programming with VB, Delphi or C#. I am
> using it for all my projects now. It just feels right.

Yes, wxFormBuilder looks very promising.

But I don't think that 3.1 in it's current state it can be recommended
for general use already. I just tried the latest version (from August)
and it does not even generate correct Python code:

self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton",
wx.DefaultPosition, wx.DefaultSize, 0 )
m_toolBar1.AddControl( m_button1 )

(i.e. "self." is missing)

Regards,

Dietmar

sturlamolden

unread,
Nov 14, 2009, 11:58:02 AM11/14/09
to
On 14 Nov, 15:35, Dietmar Schwertberger <n...@schwertberger.de> wrote:

>    self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
>    self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton",
> wx.DefaultPosition, wx.DefaultSize, 0 )
>    m_toolBar1.AddControl( m_button1 )
>
> (i.e. "self." is missing)

I had problem like that with the first beta, but not the one from
August.

Dietmar Schwertberger

unread,
Nov 14, 2009, 1:02:14 PM11/14/09
to
sturlamolden schrieb:
Which one? There are two:

08/23/2009 Version 3.01.63 (Beta)
08/19/2009 Version 3.01.62 (Beta)

I tried 3.01.63.
I can see in the Python window already that the code is not correct.


Regards,

Dietmar

sturlamolden

unread,
Nov 14, 2009, 2:52:06 PM11/14/09
to
On 14 Nov, 19:02, Dietmar Schwertberger <n...@schwertberger.de> wrote:

> 08/23/2009 Version 3.01.63 (Beta)
> 08/19/2009 Version 3.01.62 (Beta)
>
> I tried 3.01.63.
> I can see in the Python window already that the code is not correct.

3.01.63

Did you remember to install the wxAdditions?

Could you send me an .fbp file demonstrating the error?

Dietmar Schwertberger

unread,
Nov 15, 2009, 11:05:54 AM11/15/09
to
sturlamolden schrieb:

> On 14 Nov, 19:02, Dietmar Schwertberger <n...@schwertberger.de> wrote:
>> I tried 3.01.63.
>> I can see in the Python window already that the code is not correct.
>
> 3.01.63
>
> Did you remember to install the wxAdditions?
No. I think that they should not be required (a minimal version seems
to be included in wxFormBuilder) and I don't get any error message.
Also using wxAdditions for wx Python doesn't seem to be straightforward.

> Could you send me an .fbp file demonstrating the error?

Sent by email. Did you receive it?

Regards,

Dietmar

Message has been deleted

sturlamolden

unread,
Nov 15, 2009, 10:32:25 PM11/15/09
to
On 15 Nov, 17:05, Dietmar Schwertberger <n...@schwertberger.de> wrote:

> Sent by email. Did you receive it?
>

Yes I did, thank you :)

(I thought I didn't, but it was just a problem with my e-mail filter.)


sturlamolden

unread,
Nov 15, 2009, 10:42:40 PM11/15/09
to
On 14 Nov, 15:35, Dietmar Schwertberger <n...@schwertberger.de> wrote:

>    self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
>    self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton",
> wx.DefaultPosition, wx.DefaultSize, 0 )
>    m_toolBar1.AddControl( m_button1 )

I can confirm this. There seems to be a bug in the generation of
Python code for wxToolBar.


Dietmar Schwertberger

unread,
Nov 17, 2009, 11:38:44 AM11/17/09
to
sturlamolden schrieb:

If anybody faces this problem before a new revision of wxFormBuilder
will be available: an XML file need to be updated to correctly
include self.

The modification:

wxformbuilder\output\plugins\common\xml\menutoolbar.pythoncode:

<codegen language="Python">
<templates class="wxWindow">
<template name="toolbar_add">self.#parent $name.AddControl(
self.$name )</template>
</templates>

Regards,

Dietmar

0 new messages