How to compare files
Brett g Porter
bgporter at acm.org
Fri Jul 1 09:23:47 EDT 2005
Lad wrote:
> Hi,
> What is the best method for comparing two files by words?
> I was thinking about reading files by words and compare them but a word
> in one file can be linked with a new line character ( \n)
> and this '\n' will cause that the words will considered to be
> different( eventhough without '\n' are the same)
>
> Thanks for help.
> LAd.
>
Have you looked at the difflib module that comes with Python?
http://docs.python.org/lib/module-difflib.html
--
// Today's Oblique Strategy (© Brian Eno/Peter Schmidt):
// Change instrument roles
// Brett g Porter * BgPorter at acm.org
More information about the Python-list
mailing list