Still on python GUI toolkit

Luca Fini lfini at arcetri.astro.it
Tue Nov 20 07:35:36 EST 2001


I'm trying to make a sound decision of which GUI toolkit to use for a new
software project (it is the control and supervision system for a complex
scientific instrument). My target system is Linux both for development and
for the final system, although portability to Windows coud be a plus.

After browsing through the various comparisons I could find around I 
stripped down the list to three of them: Tkinter, wxWindows, PyQt.

After some pain in the neck (mostly due to my own fault) and the help of
peoples fron this and the PyKDE newsgroups I've succeeded in running a
very simple application in the three different GUI toolkits for comparison
purposes and I'd like to share my results and maybe to get more
comments/suggestions.

The application I tested is a pixel-intensive type of application because 
it is the most challenging of the tools I will need: it displays 
continuously an 80x80 syntetic image randomly generated with 256 
graytones, by using small filled squares for each pixel. I coded the three 
versions in python to my best knowledge (which is almost zero) of each 
toolkit.

My results are as follows:

1. The Tkinter version runs very close to half the speed of either PyQt 
   and wxWindows. The latter two are very close by.

2. The code structure in Tkinter application is pretty different from the
   other two toolkits which are, again, very close. I mean you get 
   classes which very similar in syntax and semantics; I actually coded
   the PyQt version from the wxWindows one almost only by changing names 
   to the classes.

3. wxWindows and PyQt are richer than Tkinter in that they both provide
   more complex widgets and more control on many aspects. I've also the 
   feeling that PyQt/wxWindows applications are somewhat more complex to 
   code, but this could depend on the fact that I know Tkinter sligthly 
   better.

4. Tkinter is better integrated into python distributions.

5. I'm not used to integrated environments, so I've not tested this 
   particular point.

Having said that I believe that I'll drop Tkinter on a speed basis, 
and also because if I actually need more efficience on some specific tools 
I can code them in c++, and my feeling is that it's easier with either 
PyQt and wxWindows than with Tkinter.

I'm still trying to make a choice between PyQt and wxWindows and I'd like 
comments and suggestions on this point.

Many thanks,

						l.f.
-- 
--------------------------------------------------------------------------
       -- )     Luca Fini                            Tel: +39 055 2752 307
 ___    |\      Osservatorio Astrofisico di Arcetri  Fax: +39 055 2752 292
/   |   | |-_   L.go E.Fermi, 5 +-----------------------------------------
(___|___//___)  50125 Firenze  /   WWW: http://www.arcetri.astro.it/~lfini
 (_)      (_)   Italia        / e-mail: lfini at arcetri.astro.it
-----------------------------+--------------------------------------------




More information about the Python-list mailing list