PDA

View Full Version : Which GUI module for python?



i.mehrzad
December 23rd, 2008, 07:33 AM
I just recently started python and am already addicted.

Just wanted to know which modules are good for programming GUI's in Python.

I've heard of the following:
PyGTK,wxPython,gist,Tkinter,PyQT.

Which is the best and the one you would recommend to go along with.

I preferred the standard module Tkinter. Any downsides to it. Or would you suggest something that is more extensible/better.

slavik
December 23rd, 2008, 07:36 AM
I like GTK, but I have not used any one of the toolkits to have a real opinion on the matter.

wmcbrine
December 23rd, 2008, 08:07 AM
The chief downside of Tkinter is that it's ugly on Linux/Unix. It can also be slow to start.

I wrote one program that chose between pygtk and Tkinter at runtime (preferring pygtk). That was fun.

i.mehrzad
December 23rd, 2008, 08:14 AM
Just to ask? What is Glade? Is it a graphical frontend for PyGTk

OutOfReach
December 23rd, 2008, 08:14 AM
I personally lean toward PyQt. Why? It's more than just a GUI toolkit, it offers bindings for Databases, Internalization, XML, Config Parsing, etc.
It also has an API that actually makes sense (*cough* GTK *cough*).

slavik
December 23rd, 2008, 08:23 AM
Just to ask? What is Glade? Is it a graphical frontend for PyGTk
Glade is a visual GUI designer and libglade is a library reads xml files generated by Glade and then creates the GUI.

nvteighen
December 23rd, 2008, 02:00 PM
I personally lean toward PyQt. Why? It's more than just a GUI toolkit, it offers bindings for Databases, Internalization, XML, Config Parsing, etc.
It also has an API that actually makes sense (*cough* GTK *cough*).

GTK+ API makes a lot of sense...

Ok, the two major GNU/Linux GUI toolkits are, in GUI functionality, pretty much the same. So, if you only want to have a GUI, pick the one you like most how it looks and that's it. But, if, for example, you want to target to KDE users, you'll better use Qt... or if you want to make use of Qt's features OutOfReach has named... (which exist because Qt served as STL for C++ before it existed... now many of those features are obsolete for C++... and more will if Boost gets into the C++ Std. Library).

Maybe the biggest difference is licensing: Qt's license is GPL, so your program will have to be GPL'ed; in order to develop proprietary apps with Qt you'll need to buy a license. GTK+ instead is LGPL, so you can develop proprietary programs with it. Of course this is irrelevant if you're just coding for fun and don't want to distribute your code, but it may be of interest in your future projects (not only in Python).

skirkpatrick
December 23rd, 2008, 02:34 PM
I use wxPython probably because I also use wxWidgets for C++ programming and you are allowed to use it for commercial applications.