Re: Any way to adjust difflib algorithm?

2009-08-19 Thread Aahz
In article fmqdncomnpg-jrjxnz2dnuvz_tti4...@posted.visi, Grant Edwards inva...@invalid wrote: On 2009-08-14, Grant Edwards inva...@invalid wrote: In my particular usage, no lines have ever been inserted/deleted, so perhaps I should be running diffs on individual lines instead? If I do that,

Re: Any way to adjust difflib algorithm?

2009-08-19 Thread Grant Edwards
On 2009-08-19, Aahz a...@pythoncraft.com wrote: In article fmqdncomnpg-jrjxnz2dnuvz_tti4...@posted.visi, Grant Edwards inva...@invalid wrote: On 2009-08-14, Grant Edwards inva...@invalid wrote: In my particular usage, no lines have ever been inserted/deleted, so perhaps I should be running

Any way to adjust difflib algorithm?

2009-08-14 Thread Grant Edwards
I'm trying to use difflib to compare two files, and it's not producing very useful results. When comparing two lines where only a few characters have changed, it usually seems to decide that a line was deleted/inserted/replaced rather than changed. Here's how I'm using it: #!/usr/bin/python

Re: Any way to adjust difflib algorithm?

2009-08-14 Thread Chris Rebert
On Fri, Aug 14, 2009 at 2:38 PM, Grant Edwardsinva...@invalid wrote: I'm trying to use difflib to compare two files, and it's not producing very useful results.  When comparing two lines where only a few characters have changed, it usually seems to decide that a line was

Re: Any way to adjust difflib algorithm?

2009-08-14 Thread Grant Edwards
On 2009-08-14, Grant Edwards inva...@invalid wrote: I'm trying to use difflib to compare two files, and it's not producing very useful results. When comparing two lines where only a few characters have changed, it usually seems to decide that a line was deleted/inserted/replaced rather than