Tue 5 Jul 2011
wxPython: Get the Event Name Instead of an Integer
Posted by Mike under Cross-Platform, Python, wxPython
[5] Comments
There was a recent post on StackOverflow that I thought was interesting. It asked how to get the event name from the event object, such as EVT_BUTTON, rather than the event’s id number. So I did some investigation into the subject and there is nothing builtin to wxPython that does this task. Robin Dunn, creator of wxPython, recommended that I should create a dictionary of the events and their ids to accomplish this feat. So in this tutorial, we’ll take a look at how to go about that. (more…)