'dispatch from Q pop'

def dispatch(self, m, *args, **kwargs):

    if (m == 'write'):
        self.write(*args, **kwargs)
    if (m == 'alert'):
        self.alert(*args, **kwargs)
    if (m == 'dump'):
        self.dump(*args, **kwargs)
