Wrapper around a Python API for creating user interfaces
One thing you could do is ensure that events only reach those who are interested in that particular type of event. Right now you seem to be sending out a generic events that you then check to see what type they are.

I wrote a similar answer some time ago to another question on Stack Overflow. You can read it here:
&#9658; https://stackoverflow.com/questions/7249388/7294148#7294148