check for events a list of events

def events(self):
        '''check for events a list of events'''
        ret = []
        while True:
            e = self.poll()
            if e is None:
                break
            ret.append(e)
        return ret