Tkinter: The good, the bad, and the ugly!

rantingrick rantingrick at gmail.com
Thu Dec 30 12:36:05 EST 2010


On Dec 30, 9:51 am, Kevin Walzer <k... at codebykevin.com> wrote:
>
> Tcl is not a domain-specific language for creating GUI's. Tcl is a
> full-featured, general-purpose programming language that is a peer to
> Python in its capabilities,

Anybody can gloat and gush about their favorite programming language
however what separates fantasy from reality is evidence of these
"theories". Or rather, Illusions of grandeur!

> and surpasses Python in some respects.

The only thing that Tcl has over Python is building Tk GUI's. Please
post evidence otherwise if you dare! In the meantime i will not be
holding my breath.

> In 2010, Tk only lacks two major features common to GUI toolkits:
>
> 1. A cross-platform printing API. This is mainly an issue on Windows,
> which lacks a rich command-line printing framework.

True windows has no "one-liner" "send-to-print-function" but what it
does have is GDI and GDI+ which are far more powerful for windows
programmers. Sure you may have to issue a few dc.MoveTo(x,y) and
dc.LineTo(x,y) and dc.TextOut(blah) but what is so hard about that?
Really, if you want a one liner just wrap up some Python code into a
nice interface. This argument is either completely bogus or utterly
idiotic.

> 2. A robust widget for HTML display.

The fact that Tkinter lacks an HTML widget is of no concern to me.
Actually if i had a choice of including HTML support or not i would
opt for not. Why? Because the simple fact is that Python needs a
simplistic GUI and not bloat-ware in the stdlib. HTML widgets, handy
dandy anolog clocks, happy faces and dancing bananas widgets belong in
3rd party extension library's and not in the Python stdlib. However we
must make sure that any GUI we support not only has these widgets
available as extension libraries but that these libraries are
currently maintained. If you are going to complain about lacking
widgets then Togl would be a good starting point.


> These days, Tkinter has pretty much everything that other GUI toolkits
> have: tree views, multi-column listboxes, plus all the basics, available
> through the core widget, the themed ttk widgets, or extension packages.
> Today, there's no excuse for developing an ugly Tk GUI--if a new Tk app
> is ugly, that's a reflection on the developer, not the toolkit.

Yes Tk is not all bad for TclTk, however it IS all bad for Python. Let
the Tcl folks use Tk and we will use a python GUI. Nuff said.

> Togl is still developed. One of its maintainers, Greg Couch, is a
> developer on the UCSF Chimera project (a Python-Tkinter based molecule
> viewer).

Have you seen the code in togl.py yourself? I mean really read it from
beginning to end? It's a hodgepodge of poorly written code. I know
this because i had to update the code myself for one of my projects.

Look i have nothing against you Kevin. However i know you and Tkinter
(and Tcl) are in bed together. So this is more of a *personal*
decision for you instead of a *community* decision. Whether Tkinter
exists in the stdlib or not should't matter to you because you can
just download it from a 3rd party site.

And *if* enough people really love Tkinter as you suggest then
removing it will not kill it. However you know as well as i do that
Tkinter is a drain on this community and the only thing keeping it
alive is the fact that it is packaged in the stdlib. Once Tkinter is
removed it will die as it should and something better will take it's
place. Something more Pythonic. And most importantly something that is
completely and totally under the direct control of the Python
community.




More information about the Python-list mailing list