# 1. load from data storage class ConsistentContext: def __init__(self, filename): self.filename = filename self._load() def _load(self): try: with open(self.filename, 'rt') as file: self.data = [eval(line) for line in file] except: print(f'making {self.filename} new') def save(self): with open(self.filename + '.tmp', 'rt') as file: for idx, line in enumerate(data): if idx > 0: file.write('\n') file.write(repr(line)) def __del__(self): self.save()
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich
- Re: [ot][spam][crazy][crazy][spam] Karl Semich