1: #line 333 "sink_drivers.ipk" 2: import sys 3: from interscript.drivers.sinks.base import sink_base 4: class cache_sink(sink_base): 5: def __init__(self, name, master_frame): 6: sink_base.__init__(self,name=name) 7: self.saved = '' 8: self.list = [] 9: self.closed = 0 10: self.master_frame = master_frame 11: 12: def raw_eol(self): 13: self.list.append(self.saved) 14: self.saved = '' 15: 16: def raw_write(self,data): 17: self.saved = self.saved + data 18: 19: def __del__(self): 20: macros = self.master_frame.get_persistent_frame('macros') 21: macros[self.name]=self.list