Re: How to compare files

2005-07-04 Thread bruno modulix
Lad wrote: > Hi, > What is the best method for comparing two files by words? try the difflib module: http://www.python.org/doc/2.4.1/lib/module-difflib.html -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" --

Re: How to compare files

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 04:39 am, 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 consider

Re: How to compare files

2005-07-01 Thread Brett g Porter
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

Re: How to compare files

2005-07-01 Thread [EMAIL PROTECTED]
you could always just remove those special characters (\n \t ..), remove spaces, read both files and compare string. I don't this is the best way of doing this... but maybe a combination of this way and yours will be efficient enough - remove all problematic characters and then compare line by line

How to compare files

2005-07-01 Thread Lad
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 sa