Generalize file.writelines() to allow iterable objects.

This commit is contained in:
Tim Peters 2001-09-23 04:06:05 +00:00
parent d31db7e939
commit 2c9aa5ea8d
5 changed files with 92 additions and 36 deletions

View file

@ -118,8 +118,7 @@ def main(args):
def restore(which):
restored = difflib.restore(sys.stdin.readlines(), which)
for line in restored:
print line,
sys.stdout.writelines(restored)
if __name__ == '__main__':
args = sys.argv[1:]