Re: file comparison

2009-08-03 Thread Dave Angel
learner learner wrote: Firstly thanks for showing the interest. I shall elobarate more on the problem: file-1.txt -- hai how r u file-2.txt --- r hai u The two files have some lines in common. For eg: File-1.txt-first line-"hai" does not match with File-2.txt-first li

Re: file comparison

2009-07-31 Thread Gabriel Genellina
En Fri, 31 Jul 2009 06:25:17 -0300, learner learner escribió: I want to compare two text files line by line and eliminate the matching/repeated line and store the unmatched/leftout lines into a third file or overwrite into one of them. Look at the difflib module: http://docs.python.org/libr

Re: file comparison

2009-07-31 Thread Dave Angel
Hendrik van Rooyen wrote: On Friday 31 July 2009 11:25:17 learner learner wrote: Hi all, I want to compare two text files line by line and eliminate the matching/repeated line and store the unmatched/leftout lines into a third file or overwrite into one of them. This is not as simple

Re: file comparison

2009-07-31 Thread Hendrik van Rooyen
On Friday 31 July 2009 11:25:17 learner learner wrote: > Hi all, > > I want to compare two text files line by line and eliminate the > matching/repeated line and store the unmatched/leftout lines into a third > file or overwrite into one of them. This is not as simple as it seems. You will probab

Re: file comparison

2009-07-31 Thread Chris Rebert
On Fri, Jul 31, 2009 at 2:25 AM, learner learner wrote: > Hi all, > > I want to compare two text files line by line and eliminate the > matching/repeated line and store the unmatched/leftout lines into a third > file or overwrite into one of them. See the `difflib` module: http://docs.python.org/l

Re: file comparison

2009-07-31 Thread Gerhard Häring
learner learner wrote: > Hi all, > > I want to compare two text files line by line and eliminate the > matching/repeated line and store the unmatched/leftout lines into a > third file or overwrite into one of them. gl & hf! -- http://mail.python.org/mailman/listinfo/python-list

Re: file comparison

2009-07-31 Thread Xavier Ho
On Fri, Jul 31, 2009 at 7:25 PM, learner learner wrote: > Hi all, > > I want to compare two text files line by line and eliminate the > matching/repeated line and store the unmatched/leftout lines into a third > file or overwrite into one of them. > Sounds like homework to me. Why not look into: