GUIs - A Modest Proposal

Kevin Walzer kw at codebykevin.com
Thu Jun 10 19:10:59 EDT 2010


On 6/10/10 5:20 PM, rantingrick wrote:
> But with Tkinter there is a larger problem,
> TclTk! Even Tk is not a full featured GUI library, much is to be
> desired.

What's your basis for saying this?

I've used Tk in nearly a dozen small-to-large applications on the Mac, 
both in Python and Tcl, and I often compare it to PyQt and wxWidgets, as 
well as Cocoa, and I think it comes up short in only a few areas:

1. Printing. Tk lacks a single API for printing documents across 
platforms. Its canvas widget can generate PostScript, and under Unix and 
OS X it is easy enough to send PostScript and text to the printer via 
lpr, but that doesn't work on Windows--and the available printing 
extensions for Windows are very different in their implementation. In 
this regard, Tk lags behind Qt and wxWidgets, as well as Cocoa.

2. Support for parsing and displaying HTML across platforms. A couple of 
different Tk extensions provide support for basic HTML display, but Tk 
lacks a binding to a modern HTML engine like WebKit and 
Mozilla--something both Qt, wxWidgets and Cocoa have in one form or 
another, either as part of the core library or as an extension.

Apart from this, Tk provides, either through its core or numerous 
extensions, pretty much everything you'd expect from a full-featured GUI 
toolkit--listboxes, buttons, entry fields, the canvas, trees, tables, 
plain-and-rich-text display, drag-and-drop, etc. Of course, because of 
its small core, you do have to install a lot of library extensions and 
search among various packages to find the right mix of widgets (there 
are, by my count, at least three major widgets for displaying trees, 
tables, and so on): if you want a single API to do these things then 
another toolkit might be better.

I develop commercial desktop GUI applications for the Mac, which has the 
most discriminating user base of any of the major platforms in terms of 
UI polish and consistency, and I use Tk for my user interfaces--and I 
have some commercial success. I do not feel that Tk lacks anything 
essential, and where it has limitations, the toolkit is flexible enough 
to allow me to work around those limitations.

--Kevin

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



More information about the Python-list mailing list