GUIs - A Modest Proposal

Jeff Hobbs jeff.hobbs at gmail.com
Fri Jun 18 18:16:13 EDT 2010


On Jun 18, 2:59 pm, Ethan Furman <et... at stoneleaf.us> wrote:
> Jeff Hobbs wrote:
> > On Jun 6, 2:11 pm, rantingrick <rantingr... at gmail.com> wrote:
> >> On Jun 6, 2:06 pm, Mark Lawrence <breamore... at yahoo.co.uk> wrote:
> >>> On 06/06/2010 16:31, rantingrick wrote:
> >>>> On Jun 5, 9:22 pm, ant<shi... at uklinux.net>  wrote:
> >>>>> I ask the group; should we try to create a new GUI for Python, with
> >>>>> the following
> >>>>> properties?:
> >>>>> - Pythonic
> >>>>> - The default GUI (so it replaces Tkinter)
> >>>>> - It has the support of the majority of the Python community
> >>>>> - Simple and obvious to use for simple things
> >>>>> - Comprehensive, for complicated things
> >>>>> - Cross-platform
> >>>>> - Looks good (to be defined)
> >>>>> - As small as possible in its default form
> >>>> Yes i one hundred percent agree! The only problem is i am the only
> >>>> one! Good luck finding others to climb into this boat. From the
> >>>> beginning there has has been this really weird love-hate relationship
> >>>> with Tkinter in the Python community. I myself experience this
> >>>> emotional attachment every day as i wish for Tkinter to be more
> >>>> "pretty" and "feature-rich" whilst at the same time loving it's
> >>>> simplicity. Tkinter seems to be Python's whipping boy and nobody wants
> >>>> to whip another, so we are stuck in limbo with a lobotomy.
> >>>> Heres an idea though, why not expand Tkinter with some new really cool
> >>>> widgets...? Hmmm...? That TIX package is a real PITA and could use a
> >>>> re-write. Can you believe it took until py3.0 for Tkinter to get a
> >>>> combobox :-O! Yea i know! :'-(
> >>> Patches are welcome at any time.  I look forward to seeing your first
> >>> contribution.
> >>> Kindest regards.
> >>> Mark Lawrence.
> >> Hello Mark,
>
> >> Are you maintaining Tkinter or Tix or both? There is a nagging issue
> >> with Tix that needs fixing. Upon subbclassing some widgets and when
> >> using the import Tix and import Tix as *. Maybe it is already fixed in
> >> 3.0 (i have not checked) but we need to fix it.
>
> >> I am still currently rewriting Tkinter Tix and IDLE in my spare time
> >> but got a bit busy lately. Anyhoo, i would really like to bring some
> >> patches, upgrades, and just a general spit shining to the entire three-
> >> plexx so let me know.
>
> > I am not a Tkinter maintainer, but I am one of the core Tk and Tix
> > maintainers (having also completely revamped Tix a couple of years ago
> > for better long-term stability and compatibility).  If you have fixes
> > that are relevant there, I can integrate them.  I should note that
> > much of Tix has been subsumed or replaced by better equivalents in the
> > core of Tk.  That said, it assumes you know and are using Tk 8.5.
> > I've seen a lot of FUD on Tk in this thread, and much of it is a
> > decade old perspective.  Tk 8.5 does have native themed widgets (using
> > Win32, Carbon or Cocoa, and X11, though also with plugins to gtk and
> > qt).  I'd have to explore more into Tkinter to see where anybody
> > derives value from Tix in current programs.
>
> > In any case, the basic mantra for Tix is new development should avoid
> > it, but existing development should work fine.  New development should
> > leverage the good work of Guilherme Polo in making the Tk 8.5 core
> > themed widgets available in Tkinter.
>
> > Jeff
>
> Thanks for the info, Jeff!
>
> Is there a good web-site / tutorial / book / etc that you would
> recommend for getting a good handle on Tk 8.5?

Most of the Tk 8.5 references will be Tcl-based, but one that is cross-
language is Mark Roseman's www.tkdocs.com.

For books, there is John Ousterhout's main book, now in the 2nd
edition, updated with Tcl/Tk 8.5 references:
  http://www.amazon.com/Tcl-Toolkit-2nd-John-Ousterhout/dp/032133633X

To understand just the changes in Tk 8.5, you can see the wiki page
that lists references for all changes:
  http://wiki.tcl.tk/10630

It includes 16 new widgets (many themed versions of classic widgets,
but key new ones like the combobox and notebook), new canvas and text
features, and more.  The wiki in general has lots of how-to reference
info (over 20K pages of content).

The key with Tk that I've seen misunderstood in this thread is that it
has lots of extensions.  Those in the core community do argue about
whether "important" widgets should be full core or kept as widgets
(where they get their own dev cycle).  There are some fantastic Tk
widgets out there, like tktreectrl (http://
tktreectrl.sourceforge.net/), tktable, many in tklib (e.g. tablelist
http://www.nemethi.de/tablelist/tablelist.html), and more.  They can
be used with any of the languages that integrate with Tk, but may not
have "built-in" support (IOW, you might need some language-specific
shim).  Overcoming these hurdles may help reduce the pain and glum
feelings people have towards Tk bound to non-Tcl languages (and is
indeed one of the points addressed by Tkx).  It doesn't help with doc
translation (for use with other languages), so that's yet another
hurdle.  :-/

Jeff



More information about the Python-list mailing list