Unix diff algorithm in Python anyone?

John Aycock aycock at csc.uvic.ca
Tue Oct 5 12:09:38 EDT 1999


harri.pasanen at trema.com wrote:
: I made some effort to track down a python module that could be used as
: unix diff.  Currently I'm in fact popen'ing diff itself, but for I'd
: like to have a self-contained utility.

: Failing a ready solution, can someone perhaps point me to a description
: of the algorithm, so I could implement it myself.

Here's some references to get you started:

W. Miller & E. W. Myers.  A File Comparison Program.  _Software -- Practice
	and Experience_ 15(11), November 1985, pp. 1025-1040.

W. Tichy.  The String-to-String Correction Problem with Block Moves.
	_ACM Transactions on Computer Systems_ 2(4), November 1984,
	pp. 309-321.

P. Heckel.  A technique for Isolating Differences Between Files.
	_Communications of the ACM_ 21(4), April 1978, pp. 264-268.

The diff source or accompanying READMEs may have some more references; the
GNU folks are usually pretty good about that.

John




More information about the Python-list mailing list