'This will be called to process events'

def post_event(self):

    if (len(self.events) == 0):
        warnings.warn(u'No    events    yet')
    elif (self.events[(-1)].name == u'key_press_event'):
        self.key_event()
    else:
        self.mouse_event()
