PyGUI as a standard GUI API for Python?

Diez B. Roggisch deets at nospam.web.de
Fri Sep 5 11:48:54 EDT 2008


Peter Decker schrieb:
> On Wed, Sep 3, 2008 at 11:57 AM, Diez B. Roggisch <deets at nospam.web.de> wrote:
>> Michael Palmer schrieb:
>>> As anyone knows, the state of Python GUI programming is a little
>>> fractured at this time, with many toolkits, wrappers and meta-wrappers
>>> dead and alive, with or without documentation.
>>>
>>> I've come across two projects that have the appeal of striving for
>>> simple, pythonic APIs: PyGUI and wax.  The latter is a wrapper around
>>> wxPython. It is  lacking documentation but actually quite usable and
>>> concise. The other, PyGUI, has an even nicer API and more docs but has
>>> relatively few widgets implemented at this time. It also strives for
>>> compatibility with several toolkits (two at this time), which I think
>>> is the right idea.
>> I disagree with that. Meta-wrappers like this will always suffer from
>> problems, as they have difficulties providing a consistent api. For example
>> wx is said to be very windows-toolkit-centric in it's API. Yes I know that
>> it works under Linux with GTK, but it does not come as natural .
> 
> With all due respect, it seems like you are not terribly familiar with
> wxPython. It uses the native UI toolkit for each platform wherever
> possible: Aqua on OS X; MFC on Windows and Gtk on Linux. Applications
> tend to look 'natural' on each platform, rather than uniform across
> platforms, and I believe that this is what most people prefer.

You got me wrong. I didn't say it doesn't use the native toolkit under 
various OSes, I'm well aware of that it does.

What I *did* say was that wx API is designed primarily with windows' 
toolkit as base, and as a consequence the API tends to be less 
functional for other toolkits, making it harder to work with it. As the 
OP was after a "one API to rule them all" for GUIs, I pointed that out.

See for example this (arguably somewhat dated) post that illustrates my 
point:

http://mail.python.org/pipermail/python-list/2005-March/313354.html

 From my personal experience with Qt and Cocoa, I can say that both are 
great, but their full power is unleashed only if used directly - talk 
about Multi-threading in Qt4, or KeyValue-coding in Cocoa. Neither is 
available in wx.

Diez



More information about the Python-list mailing list