[Tutor] Diff Module? [diff/ndiff]

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Wed, 14 Aug 2002 15:23:18 -0700 (PDT)


On Wed, 14 Aug 2002, SA wrote:

> Does anyone know of a diff module?
>
> Right now I'm going to diff two lists which should not be hard to do,
> but in the future, it my be prudent to adapt some type of module to do
> the dirty work.

Here you go:

    http://www.python.org/doc/lib/module-difflib.html


By the way, the 'viewcvs' program uses a modified version of diff called
'ndiff' that's supposed to be more human-understandable than regular diff.
You may be able to adapt it toward your list comparisons.  It's located in
viewcvs's lib/ directory:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/viewcvs/viewcvs/lib/ndiff.py?rev=1.3&content-type=text/vnd.viewcvs-markup