def replaceLines(path, line_xform):
    output_lines = [line_xform(line) for line in readLines(path)]
    pathlib.Path(path).write_text('\n'.join(output_lines), encoding='utf-8')
def replaceLines(path, line_xform):
    output_lines = [line_xform(line) for line in readLines(path)]
    pathlib.Path(path).write_text('\n'.join(output_lines), encoding='utf-8')