Which GUI?

ndev42 at my-deja.com ndev42 at my-deja.com
Tue Feb 22 16:50:25 CET 2000


In article <38B2910B.A0AD14C3 at bellatlantic.net>,
sholden at BellAtlantic.net wrote:
[...]
> Of course, you would create these widgets to conform with
> the appropriate look-and-feel for each platform to which
> you were porting?  Generally, the amount of effort required
> to build a portable GUI layer is CONSIDERABLY
> greater than "some".

If you call the "Button" widget from the underlying window
library, no matter what it is you will get a Button with the
local look'n'feel. No effort there. OTOH, if you try to
keep a consistent look'n'feel over platforms, you'll get
into trouble pretty quickly, I agree.


> Let's be clear: you are complaining about the complexity of
> your environment, not the complexity of Python's GUI support.

Perfectly right!


> IMO, the Python builders took a very sensible decision
> to use an existing GUI toolkit, and while I agree some
> of the implementation details are plain ugly, fortunately
> they are hidden below the abstraction we use
> to access them.

Reusing other people's code buys you time and efforts,
but at a certain cost. If Tcl/Tk has a bug, Python/Tkinter
has the same bug, too. If Tcl/Tk is hard or heavy to install,
Tkinter will be too (actually not Tkinter itself but the
dependencies it needs to run). If Tcl/Tk has problems running
on Macs, Python/Tkinter has problems too. You spare the
development time but you pay a price later.

Right. Now let's (at least try to) be more constructive:

Imagine for a moment that Tkinter has bindings not only to Tk
but also to Qt/KDE, GTK+/Gnome, X11, Mac, Win, etc. At install
time, the installation procedure tries to determine what kind of
GUI package is available on your system, and you tell which one
you want to take over the support for GUI stuff. Then you can
program your GUI without thinking about which window library is
actually going to render your widgets. That would make your GUI
code compatible on all stations possibly supporting all of the
above stuff. Sure, look'n'feel will be dependent on the underlying
library, but other than that it would be paradise to distribute
Python GUIs.

You want to run my application with its GUI.
-> You are running Win/Mac? Nothing to install.
-> Linux? You must have Gnome, KDE, or Tcl/Tk somewhere around.
-> Other Unixes? Either you have one of the supported window
   libraries, or you need to install one. Pick the one you prefer.

To achieve that, we could make a part of Python become the standard
for GUI programming (I took Tkinter as an example in the above) and
request to people doing GUI bindings to Python to do it through this
interface. Instead of saying that library XXX has Python bindings,
you could now declare that you have made Python/GUI bindings.

I'm sure there are nasty side-effects to that. Ideas?

--
Nicolas


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list