GUIs - A Modest Proposal

Kevin Walzer kw at codebykevin.com
Tue Jun 8 09:55:59 EDT 2010


On 6/8/10 1:16 AM, rantingrick wrote:
> On Jun 7, 11:51 pm, alex23<wuwe... at gmail.com>  wrote:
>
> <snip>
>
> Of course i was just being theatrical alex, i hope your last post was
> in the same manner. However your right about everything you said
> except your accusations that i am not willing to help bring this into
> reality -- i just need to find the right base... and i may have just
> found it in PyGUI!!
>
>      http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
>
> My first impression of PyGUI is very good because it looks promising,
> and of course has a native look and feel. Just grazing over the docs i
> was very impressed. Greg has outlined some simple and clear goals
> which are exactly what Python needs in a GUI. He has the vision and
> quite a bit a code already written. Heck he even has an OpenGL hashed
> already. From what i can see so far the API very Pythonic. I think
> it's love at first sight really. I encourage others to take a look at
> PyGUI and see what they think. Judge for yourself.
>

I have no opinion on the merits of PyGUI itself, but after taking a 
quick look at the site and the docs, it seems to be an abstraction API 
over three different, platform-specific GUI toolkits--PyObjC (Mac), 
PyGtk (X11) and Windows (pywin32). That means that, whatever its other 
virtues, it certainly is *not* a lightweight GUI toolkit that could 
easily be incorporated into the Python core library--it instead has 
rather complex dependencies on both other GUI toolkits and Python 
wrappers of those toolkits. (A wrapper of a wrapper of a wrapper....)

In my view, any original, Python-native implementation of a GUI toolkit 
that is small enough to be included in the standard library will wind up 
looking much like Tk. Tk implements its own API on each of the major 
platforms, interfacing directly with the platform primitives at a low 
level (Xlib, Carbon or Cocoa, and win32); it uses native widgets if they 
map to its API and implements its own widgets in other cases. Because it 
sticks to a limited widget set, it's able to to be small.

Since Tk already provides a basic GUI toolset, and Python can interface 
with it more directly than it can with other toolkits (PyGui -> PyGtk -> 
Gtk -> Xlib), it's not clear to me what is gained by starting from 
scratch here. (Is it the presence of the Tcl interpreter? I know Tcl is 
not to everyone's taste, but it is an amazing language...)

--Kevin

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



More information about the Python-list mailing list