pygtk vs. wxPython

Jeremy Bowers newsfroups at jerf.org
Fri May 17 10:59:27 EDT 2002


Thomas Guettler wrote:
> Hi!
> 
> I investigated during the last weeks which is better:
> +pygtk or wxpython.
> 
> After programming some code with both libraries, I prefer
> pygtk.

This is a good reason to prefer pygtk.

> I prefere pygtk because wxpython has an extra layer in
> the library stack:
> 
> wxpython -- wxwindows -- wxgtk -- gtk
> 
> pygtk -- gtk
> 
> Do others share or disagree with this oppinion?

No offense intended, but this is a rather silly reason, plus it's wrong. 
Firtst, nowadays, the question is not "How complicated is the 
implementation?" so much as "Does it work?"  If something sits on top of 
Windows and implements a GUI, it's complicated, period. (GUIs are 
inherently complicated.) It's not a differentiating factor.

Secondly, your stack is incorrect. For wxPython, AFAIK, it goes like this:

(On windows machines)
wxPython -> wxWindows (MFC) -> WinAPI

(On XWindows machines)
wxPython -> wxGTK -> GTK -> XWin API

(On either)
pyGTK -> GTK -> XWin API


wxWindows is a specification with seperate implementations for each 
library, which is why there are varying levels of support for some of 
the implementations (mostly the marginal ones). wxWindows never "calls" 
wxGTK, on XWindows machines, wxWindows *is* wxGTK.

Again, the complexity is a null factor here. The question is, which do 
you prefer? Add up your requirements. If you just want to run on Linux, 
and don't need any of the extra widgets wxWindows may provide, then 
pyGTK is fine. (I don't know how pyGTK does on Windows, though my guess 
would be "not well for another year or two yet, if anybody's actually 
trying to make it work", despite what the FAQ says. Sometimes, the 
programmer's idea of "well" and the user's idea of "well" can differ... 
"works well as long as you only use the core widgets". Correction 
welcomed, but keep the last sentence in mind; my definition of "well" is 
"no major surprises, even if you do use gtkObscureWidget with the 
gtkObscureOption.")

If you want cross-platform capabilities, or need a widget that is in 
wxWindows but not pyGTK, then go wxWindows.




More information about the Python-list mailing list