[Python-3000] Requirements for a standard GUI library

Travis E. Oliphant oliphant.travis at ieee.org
Wed May 10 23:11:21 CEST 2006


Greg Ewing wrote:
> Travis E. Oliphant wrote:
>> Just get a 
>> window-area from each platform's lowest-level tool and then draw your 
>> widgets to the screen directly.
> 
> But then you have something that looks totally non-native
> on all platforms. While it may be useful to have such a thing,
> it's not what PyGUI is designed to be.
>

Sure, I understand that.  With appropriate theming, though it could be 
made to look "native"  -- that's what Enthought is doing..


>> The thing that bothers me most about all of Python's GUI 
>> toolkits is that they are almost always wrappers of wrappers of wrappers...
> 
> And I'm trying to minimise this by building PyGUI as directly
> as possible on what the platform already provides. But not
> at such a low level that native appearance and behaviour
> is lost.
> 
>> I suspect you could start by just interfacing with the 
>> "platform-default" toolkits MFC, Cocoa, Gnome, and KDE (using ctypes for 
>> example) and then using an approach similar to PyGUI to wrap them all up 
>> using standard calls.
> 
> Um... how would that be different from PyGUI itself?
> 

Not much different at all except in breadth.  I like the idea of PyGUI 
(it doesn't cover all backends, yet though).   Sorry I wasn't more 
clear.  The only thing I would wish different is to get rid of the PyGTK 
dependency.   I think PyGUI should be a wrapper directly on top of GNOME 
because the only reason not to go down to raw X11 is for look-and-feel. 
  Thus, PyGUI should go to the GNOME libraries and wrap them directly 
instead of using another Python layer that wraps it.  Then another PyGUI 
backend would wrap the KDE libraries directly for its look and feel (but 
the same PyGUI paradigm).

In short, I don't like the chaining effect of wrapper on top of wrapper. 
  I want to make the connection to platform libraries as simple as 
possible.   Ultimately, I also think PyGUI should provide a simple 
look-and-feel of its own as well for situations where there is no 
"platform" look and feel (i.e. Unix users without either KDE or GNOME 
and just X11 or some other windowing environment).

Such a thing would be a very useful addition to Python.   And make no 
mistake, I think PyGUI is going in the right direction.  So, three 
cheers for Greg...


Best,

-Travis



More information about the Python-3000 mailing list