def directWriteLines(path, lines): with fileUtils.open_ex(path, "dw") as f: return f.writelines(lines)
def getReadDelay(self): with fileUtils.open_ex(lvm.lvPath(self.sdUUID, sd.METADATA), "dr") as f: t = time.time() f.read(4096) return time.time() - t
def directReadLines(path): with fileUtils.open_ex(path, "dr") as f: return f.readlines()
def _directWriteLines(path, lines): with open_ex(path, "dw") as f: return f.writelines(lines)
def _directReadLines(path): with open_ex(path, "dr") as f: return f.readlines()