Noah wrote: > I am researching a nice slick way to provide the difference between > generated python multi-line configuration output and specific > configuration lines gathered from an output file. I could put things in > a list? I could put both forms output into IOString() and run a diff > command to it?
There's difflib in Python's standard library: >>> import difflib >>> print("".join(difflib.unified_diff( ... ["foo\n", "bar\n", "baz\n"], ... ["foo\n", "baz\n", "bang\n"]))) --- +++ @@ -1,3 +1,3 @@ foo -bar baz +bang -- https://mail.python.org/mailman/listinfo/python-list