'Activate message\'s bufferization, can also be used as a decorater.'

def bufferize(self, f=None):

    if (f != None):
        @functools.wraps(f)
        def wrapper(*args, **kwargs):
            self.bufferize()
            f(*args, **kwargs)
            self.flush()
        return wrapper
    if (not self.buffering):
        self.out = StringIO()
    self.buffering += 1
