Re: DiffLib Question

2007-05-07 Thread Gabriel Genellina
En Mon, 07 May 2007 00:52:18 -0300, whitewave <[EMAIL PROTECTED]> escribió: > I am currently doing the third option. Doing file.read() to both file > to be compared then feed the result to the compare function. > > Let me give you a brief sample of what I want to achieve. > > Using this code

Re: DiffLib Question

2007-05-06 Thread whitewave
Hello, I am currently doing the third option. Doing file.read() to both file to be compared then feed the result to the compare function. Let me give you a brief sample of what I want to achieve. Using this code >>> diffline=[] >>> fileDiff = difflib.Differ().compare(f1, f2) >>> diffline = list(

Re: DiffLib Question

2007-05-05 Thread Gabriel Genellina
En Fri, 04 May 2007 06:46:44 -0300, whitewave <[EMAIL PROTECTED]> escribió: > Thanks! It works fine but I was wondering why the result isn't > consistent. I am comparing two huge documents with several paragraphs > in it. Some parts in the paragraph returns the diff perfectly but > others aren't.

Re: DiffLib Question

2007-05-04 Thread whitewave
> Usually, Differ receives two sequences of lines, being each line a > sequence of characters (strings). It uses a SequenceMatcher to compare > lines; the linejunk argument is used to ignore certain lines. For each > pair of similar lines, it uses another SequenceMatcher to compare > charac

Re: DiffLib Question

2007-05-02 Thread Gabriel Genellina
En Wed, 02 May 2007 06:26:13 -0300, whitewave <[EMAIL PROTECTED]> escribió: > Thank you for your reply. But I don't fully understand what the > charjunk and linejunk is all about. I'm a bit newbie in python using > the DiffLib. I'm I using the right code here? I will I implement the > linejunk

Re: DiffLib Question

2007-05-02 Thread whitewave
Hi, Thank you for your reply. But I don't fully understand what the charjunk and linejunk is all about. I'm a bit newbie in python using the DiffLib. I'm I using the right code here? I will I implement the linejunk and charjunk using the following code? >>> a = difflib.Differ().compare(d1,d2)

Re: DiffLib Question

2007-05-02 Thread Michele Simionato
On May 2, 10:46 am, whitewave <[EMAIL PROTECTED]> wrote: > Is there a way for me to disregard > the newlines and spaces? > > Python 2.3 > WINXP > > Thanks. > Jen HTH: >> help(difflib.Differ.__init__) Help on method __init__ in module difflib: __init__(self, linejunk=None, charjunk=None) unbound

DiffLib Question

2007-05-02 Thread whitewave
Hi Guys, I'm a bit confused in difflib. In most cases, the differences found using difflib works well but when I have come across the following set of text: >>> d1 = '''In addition, the considered problem does not have a meaningful >>> traditional type of adjoint ... problem even for the sim