In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > File "./scripts/regressionTest.py", line 30, in getSnapShot > if (difflib.context_diff(f1.readlines(), f2.readlines()).len() == > 0): > # no difference > else: > # files are different > AttributeError: 'generator' object has no attribute 'len' > > Can you please help?
The function returns a generator/iterator over the differences which has no `len()` method. If you just want to know if two files are equal or not use `filecmp.cmp()`. Read the docs about the `shallow` argument of that function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list