Tkinter vs wxPython: your opinions?

Geoff Talvola gtalvola at nameconnector.com
Thu Jan 25 18:29:27 EST 2001


> "Neil Cerutti" <cerutti at together.net> wrote in message news:slrn9710o1.73.cerutti at fiad06.norwich.edu...
> >
> > For comparison purposes, I'm writing my first GUI app, a simple
> > wrapper for slrn, in Tkinter and wxPython.

Here's my opinion, and keep in mind that I only use Windows:

I initially chose Tkinter for a Python GUI because of the excellent book "Python and Tkinter Programming" by John Grayson.  If you plan on using Tkinter, you MUST get this book.  Nothing even close to this exists for wxPython, and I can't imagine doing Tkinter programming without it.

In addition to the excellent book, I do like Tkinter's "pack" and "grid" layout managers, and code using Tkinter seems pretty concise.  For applications where functionality is everything and little details of appearance are not important, Tkinter is great.

That said, I'm considering switching to wxPython because of the following issues:

* Tkinter has no multi-column list box with resizable columns -- wxPython does.
* Tkinter has no built-in way to change the icon that shows up in the upper-left corner of your windows -- wxPython does.  I don't want to see "Tk" on all of my windows.  (I was able to get around this problem by writing an extension DLL to change the icon after the window comes up.)
* Tkinter puts an annoying underline underneath the selected item in a list box.  wxPython's list box looks like native Windows (because it is native windows).  (I was somehow able to get around this problem after a lot of experimenting with options.)
* PMW's combo box doesn't look or act like the standard Windows combo box. (Again, a lot of tweaking of options and some editing of Tkinter source code made it look and act a lot more like the Windows combo box, but not exactly.)
* When you pop up a new window in Tkinter, you can see it place the widgets in one position, then resize the window and shuffle the widgets around.  Looks unprofessional.  (You can open up the window off-screen, get it to shuffle the controls while the window is off-screen, then move it onto the screen to work around this problem.)
* wxPython supports ActiveX controls, so if there's something it doesn't do natively, I can pop in an ActiveX control to do it.  Tkinter doesn't support this directly, although I think there's a Tk module that can do ActiveX.  Good luck adapting it to Tkinter.
* wxPython has a really nice-looking GUI designer, wxDesigner, although it costs some money.  There's also Boa Constructor for a free designer, but it's not nearly as easy to use as wxDesigner.  Tkinter has nothing comparable.  Maybe PythonWorks's designer will one day be as nice as wxDesigner.
* wxPython is much faster (once it's loaded).

As you can see, I was able to work around some of the issues above, but with wxPython I won't have to work around them; things will work as people to expect them to work in the Windows world.  At least I hope so -- I haven't converted yet!

--


- Geoff Talvola
  Parlance Corporation
  gtalvola at NameConnector.com





More information about the Python-list mailing list