ignoring or replacing white lines in a diff

Zachary Ware zachary.ware+pylist at gmail.com
Thu Jan 14 15:54:24 EST 2016


On Thu, Jan 14, 2016 at 2:22 PM, Adriaan Renting <renting at astron.nl> wrote:
> Any suggestions?

Instead of trying to make diff behave through subprocess, have a look
at Python's difflib: https://docs.python.org/3/library/difflib.html

In particular, I think `difflib.ndiff(first_list_of_strings,
second_list_of_strings, linejunk=difflib.IS_LINE_JUNK)` might be what
you're looking for (you may not even need to specify linejunk).

-- 
Zach



More information about the Python-list mailing list