Where's GUI for Python?

Bill nothanks at null.invalid
Sun Mar 2 05:04:06 CET 2008

Peter Decker wrote, On 3/1/2008 9:58 PM:
> On Sat, Mar 1, 2008 at 3:35 PM, K Viltersten <tmp1 at viltersten.com> wrote:
>> I'm certain there is an API for creating
>>  GUI's but as far i can find it in the
>>  http://docs.python.org/tut/tut.html
>>  the only "gui" is in "Guido".
> Check out Dabo: http://dabodev.com
> It uses the wxPython UI toolkit, but wraps it in a much more Pythonic API.
> I've been using Dabo for over a year, and it rocks!!

Hi Peter,

You should also take a look at wxGlade:


which sits on top of wxPython:


which wraps wxWidgets:


I've found that wxGlade is more usable, currently, than Dabo in it's 
visual layout tools that help you create the GUI for your apps.

If you want a more "Pythonic" API (more than wxPython/wxWidgets) and 
want to write your GUI using mainly code instead of a visual layout 
tool, then Dabo is probably the way to go.

If you want an interactive application that lets you visually create 
Frame or Dialog based applications, full of "widgets", then wxGlade is 
pretty good these days.  Dabo, last time I looked, didn't yet have a 
usable visual menu creation capability in it's toolset, and this is a 
major reason, for me, that I currently have gravitated back to wxGlade. 
  Also, although Dabo has a "Class Designer" that can design the GUI 
visually, and is in some ways more advanced than wxGlade, it seems in 
other ways to be more limiting.

Neither one, unfortunately, is very well documented, but wxGlade is 
fairly obvious, and directly generates wxPython code (not a "higher 
level" API as is done in Dabo), which lets you use the wxGlade and 
wxWidgets documentation to figure things out.

Also, BTW, I think the statement on the wxGlade site about "the 
generated code does nothing apart from displaying the created widgets", 
is not really true, and should be re-worded.  Current versions of 
wxGlade include the capability to automatically create simple 
event-handler functions, and automatically generates the code to connect 
the events generated by the GUI widgets to the event handlers.  In my 
opinion, this is much more than doing "nothing apart from displaying the 
created widgets".  It helps make it real easy to call your handler 
functions, and I don't really want it doing much more than that anyway.

In either case, when you write your own code, it is probably best to 
learn how to have the tool generate the code containing the classes that 
form the GUI interface, but, use derived classes (subclasses) in your 
own separate file(s) to form your application's interface to the GUI. 
That way, you can let wxGlade (or Dabo) always generate (and overwrite) 
its own code that remains entirely separate from your own code.


More information about the Python-list mailing list