events in wxpython user interfaces event loop the main processing loop of the gui that waits for an event to occur when an event occurs the associated event handler is called event handlers these are methods (or functionsthat are called when an event occurs event binders associate type of event with an event handler there are different event binders for different types of event for examplethe event binder associated with the wx moveevent is named wx evt_move the relationship between the eventthe event handler via the event binder is illustrated belowthe top three boxes illustrate the concepts while the lower boxes provide concrete example of binding move_event to an on_move(method via the evt_move binder types of events there are numerous different types of event includingwx closeevent used to indicate that frame or dialog has been closed the event binder for this event is named wx evt_close wx commandevent used with widgets such as buttonslist boxesmenu itemsradio buttonsscrollbarssliders etc depending upon the type of widget that generated the event different information may be provided for examplefor button commandevent indicates that button has been clicked where as for listbox it indicates that an option has been selectedetc different event binders are used for different event situations for exampleto bind command event to event handler for button then the wx evt_button binder is usedwhile for listbox wx evt_listbox binder can be used wx focusevent this event is sent when window' focus changes (loses or gains focusyou can pick up window gaining focus using the wx evt_set_focus event binder the wx evt_kill_focus is used to bind an event handler that will be called when window loses focus