GTK or TKinter (or what else?)

Greg Krohn greg at invalid.invalid
Mon May 24 04:10:17 EDT 2004


Marco Terzuoli wrote:
<snip>
> ...Moreover, I know you can use wxWindows as
> well... I have tried it in my C program and didn't like the way events were
> handled.

What didn't you like about the event handling? If it's the IDs and EVT_* 
functions, they sort of remedied that in the most recent version (2.5).
Instead of this:

 >>> ID_SEARCH = wx.NewId()
 >>> button = wx.Button(parent, ID_search, "Search")
 >>> EVT_BUTTON(ID_SEARCH, searchFunction)

You can do this:
 >>> button = wx.Button(parent, -1, "Search")
 >>> button.Bind(EVT_BUTTON, searchFunction)

Of course what would be really slick is if they implemented event 
handling as kwargs[1]. Also, I hear that wxPython is Windows-centric, so 
if you're developing on and/or mostly using Linux, you might be better 
off with something else.


greg

[1] http://tinyurl.com/2n5gl I did a rough patch for this.





More information about the Python-list mailing list