from buffer import Buffer class DataBuffer(Buffer): btype = 'data' def __init__(self, name, data): Buffer.__init__(self) self._name = name self.lines = data.split("\n") def name(self): return self._name def close(self): pass def readonly(self): return True