Run the loop.

def loop(self, events=[]):
        '''
        Run the loop.
        '''
        try:
            for e in events:
                if e.type == METAEVENT:
                    e = self.MetaEvent(e)
                for func in self.event_funcs.get(e.type, []):
                    func(self, self.gstate, e)
        except self.Message as e:
            return e.message