Tkinter or wxpython?

Kevin Walzer kw at codebykevin.com
Mon Aug 6 17:27:32 CEST 2007


Paul Rubin wrote:

> 
> Tkinteger (dang, I always end up typing it that way, I won't even
> bother fixing the error) is easy to use for simple gui's, and it's
> part of the standard python distro which for me is a big advantage (no
> extra crap to download).  However, the widget set is rather ugly and
> doesn't blend in well with anyone's native widgets; the widget
> selection itself is rather narrow, and I think kyosohma may be right
> that it doesn't scale well to complex gui's.  I've looked at the code
> for IDLE's gui and it's terrifying.

It's entirely possible to make sophisticated GUI's in Tkinter, but you 
are right, most people don't. Part of the issue is that Tkinter 
developers haven't kept up with what's going on in Tk and instead use 
outdated, ugly widget sets like Tix, PMW, and so on. Making use of the 
available wrappers for current Tk libraries such as BWidgets, Tile, 
Tablelist, TkTreeCtrl, and so on allows you to make UI's every bit as 
polished as what comes with wxPython: tree views, multi-column lists, 
notebook tabs, comboboxes, etc., with platform-specific theming 
(XP/Vista, Aqua/OS X, and X11).

For more references, see:

http://tkinter.unpythonic.net/wiki/TileWrapper
http://tkinter.unpythonic.net/wiki/TableListWrapper
http://tkinter.unpythonic.net/wiki/TableListTileWrapper
http://tkinter.unpythonic.net/wiki/PyLocate
http://tkinter.unpythonic.net/wiki/PyLocateTile
http://tkinter.unpy.net/bwidget/
http://tkinter.unpy.net/wiki/NoteBook
http://klappnase.zexxo.net/TkinterTreectrl/index.html

> 
> At this point I think nobody should write desktop gui apps without a
> good reason.  There is a fairly flexible and easy to program gui
> already running on almost every desktop, namely the web browser.
> Before you write a gui using some client side toolkit, ask yourself
> whether you can instead embed a web server in your application and
> write an HTML gui.  That approach is not always the answer, but it has
> considerable advantages when you can do it that way.

Given a choice between a rich desktop client and a web app, I'd choose 
the desktop client in most cases. It's just much more pleasant to work 
with .

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com



More information about the Python-list mailing list