maop
maop

Reputation: 213

python library similar to R's diffr

I am using diffr library to display the differences between two files. The advantage of it is the nice display to show the comparisons side by side, which makes it is easier to see the differences for the non-techy end-users.

I found this link, but this is not exactly what I want.

Is there any library in Python 3 equivalent to R's diffr?

An example to how diffr output looks like can be found in this link: In R, find whether two files differ

Upvotes: 0

Views: 180

Answers (1)

Oliver Hnat
Oliver Hnat

Reputation: 793

You should take a look at difflib, you could do something like this

difflib.SequenceMatcher(None, file1.read(), file2.read())

Upvotes: 1

Related Questions