Re: Tkinter vs. wxPython?
From: Peter Milliken (peterm_at_resmed.com.au)
Date: Wed, 28 Apr 2004 07:06:06 +1000
wxPython will not "replace" Tkinter (IMO :-)) if you mean that Tkinter will
become a dead letter. Tkinter was first, has much support through add-ons
such as Pmw and is still the most extensively documented Python GUI. It
builds on the broadbase available through the Tcl/Tk community and provides
many more resources than I could find for wxPython.
I originally wrote a small app using Tkinter, then attempted a rewrite in
wxPython ("lunch time" exercise in both cases so this activity literally
spanned years! :-)) . I don't claim to be a GUI programmer BTW :-)
The main reason I started down the wxPython conversion path was I wanted to
be able print on a Windoze platform and wxPython seemed to offer an
interface that would achieve that. I can't really remember what "went wrong"
but I abandoned the wxPython conversion and went back to using Tkinter -
however, I did keep the print code that I developed and actually communicate
via TCP/IP to that "app" from my Tkinter app with print instructions and the
stream of text to print. I think the sticking point with wxPython was I was
unable to achieve the same key binding flexibility that I had achieved
through Tkinter - I'm sorry, I really can't remember what exactly it was. I
remember some extreme frustration though getting my head around the
different model that wxPython offered :-)
Having said all that, I have a background in Tcl/Tk (probably 7 years ago
now, I wrote a small GUI app in Tcl/Tk and then re-wrote it in Ada/Tk). I
have a GUI book for the Tcl/Tk and then purchased Grayson's Tkinter GUI book
when I moved across to Python - I find reading a much simpler way of
learning :-). I was unable to find an published work on wxPython and whilst
the mailing list is helpful it just wasn't the same as solving a problem by
using one of more books as reference :-) I haven't remained in touch with
the wxPython community, but last I heard, that book on wxPython was still in
the "real soon now" category :-)
I find the Tkinter/Pmw combination very powerful - much of my later
additions to my small GUI app have used Pmw and inheritance extremely
heavily and I am exceptionally pleased at how re-usable some of my GUI
classes worked out - I saved some significent work on at least one GUI page
by small class modification and re-use. Tkinter builds on the efforts of
another large group of individuals - the Tcl/Tk people. Whereas, dare I say
it?, the wxPython effort is based on the efforts of a much smaller group of
individuals, leaving you often to puzzle through wx reference
documentation - and it ain't easy to learn something from reference
So my personal recommendation would be to stick with the Tkinter approach,
there is more documentation available (you can even read books based on
using Tk with Tcl that will help you to learn and "solve" those GUI problems
if you can't find a solution from a Tkinter book :-)) and I believe there
are more Python users of Tkinter from which you can request help if you find
a sticking point.
Just my thoughts on the topic :-)
<SeeBelow@SeeBelow.Nut> wrote in message news:408E9DCA.EC753FE6@shaw.ca...
> Do many people think that wxPython should replace Tkinter? Is this
> likely to happen?
> I ask because I have just started learning Tkinter, and I wonder if I
> should abandon it in favor of wxPython.
> Mitchell Timin
> "Many are stubborn in pursuit of the path they have chosen, few in
> pursuit of the goal." - Friedrich Nietzsche
> http://annevolve.sourceforge.net is what I'm into nowadays.
> Humans may write to me at this address: zenguy at shaw dot ca