events in wxpython user interfaces event handling events are an integral part of any guithey represent user interactions with the interface such as clicking on buttonentering text into fieldselecting menu option etc the main event loop listens for an eventwhen one occurs it processes that event (which usually results in function or method being calledand then waits for the next event to happen this loop is initiated in wxpython via the call to the mainloop(method on the wx app object this raises the question 'what is an event?an event object is piece of information representing some interaction that occurred typically with the gui (although an event can be generated by anythingan event is processed by an event handler this is method or function that is called when the event occurs the event is passed to the handler as parameter an event binder is used to bind an event to an event handler event definitions it is useful to summarise the definitions around events as the terminology used can be confusing and is very similarevent represents information from the underlying gui framework that describes something that has happened and any associated data the specific data available will differ depending on what has occurred for exampleif window has been moved then the associated data will relate to the window' new location where as commandevent generated by selection action from listbox provides the item index for the selection (cspringer nature switzerland ag huntadvanced guide to python programmingundergraduate topics in computer science