class DastFile(ObjectFile): def __init__(self, filename, mode = 'r', cls = File, flush = 0, emptylines = 0, **dastArgs): super(DastFile, self).__init__(filename, cls, flush, emptylines, mode = mode) self.dast = DAST(**dastArgs) def _write(self, item): self.dast.dump(item, self.file, newline = True) def _read(self): return self.dast.decode(self.file.file)
def __init__(self, filename, mode='r', cls=File, flush=0, emptylines=0, **dastArgs): super(DastFile, self).__init__(filename, cls, flush, emptylines, mode=mode) from nifty.data.dast import DAST self.dast = DAST(**dastArgs)
class DastFile(ObjectFile): def __init__(self, filename, mode='r', cls=File, flush=0, emptylines=0, **dastArgs): super(DastFile, self).__init__(filename, cls, flush, emptylines, mode=mode) from nifty.data.dast import DAST self.dast = DAST(**dastArgs) def _write(self, item): self.dast.dump(item, self.file, newline=True) def _read(self): return self.dast.decode(self.file.file)
def __init__(self, filename, mode = 'r', cls = File, flush = 0, emptylines = 0, **dastArgs): super(DastFile, self).__init__(filename, cls, flush, emptylines, mode = mode) self.dast = DAST(**dastArgs)