Tkinter vs wxPython: your opinions?

Geoff Talvola gtalvola at nameconnector.com
Fri Jan 26 17:39:09 EST 2001


cbarker at jps.net wrote:

> The downside of the close link between the C++ and Python is that there
> are a number of things that are not very Pythonesque. The most obvous
> thing that comes to mind is event tables. I find myself writing three
> lines of code for what could be done with one (asd far as I can tell) an
> example (from the demo)
>
> ID_ABOUT_MENU = 200
> help_menu.Append(ID_ABOUT_MENU,
>                  "&About",
>                  "More information About this program")
> EVT_MENU(self, ID_ABOUT_MENU, self.OnAbout)
>
> When would I want a menu item , without an function attached to the
> EVT_MENU ? IF i want tou use a name to label the itemI need another line
> of code to do that.
>
> I'd like to see:
> help_menu.Append(ID_ABOUT_MENU,
>                  "&About",
>                  "More information About this program",
>                  callback = self.OnAbout)
>
> That would make a lot more sense, but frankly, it's really just a small
> annoyance once you get used to it.

Seems like it would be pretty easy to write a set of wrappers around wxPython to make it feel much more Pythonic.  Your example is a good one where a simple wrapper class could make it much more natural to use.

Ah, I see that you suggested the same thing later on in your message.  Well, here's another voice saying that it would be a good thing...

--


- Geoff Talvola
  Parlance Corporation
  gtalvola at NameConnector.com





More information about the Python-list mailing list