pmacs3/buffer/data.py

18 lines
434 B
Python
Raw Normal View History

2008-10-29 10:58:06 -04:00
from buffer import Buffer
class DataBuffer(Buffer):
btype = 'data'
def __init__(self, name, data):
Buffer.__init__(self)
self._name = name
2020-09-04 00:03:00 -04:00
if type(data) == bytes:
self.lines = data.decode('UTF-8').split('\n')
else:
self.lines = data.split("\n")
2008-10-29 10:58:06 -04:00
def name(self):
return self._name
def close(self):
pass
def readonly(self):
return True