def flush(self): """ :type self: StringIONotifying or StringIO """ StringIO.flush(self) self.listener()
def __init__(self, listener): """ :type self: StringIO """ StringIO.__init__(self) self.listener = listener