File comparison with exceptions

Pratik Khemka pratikkhemka at hotmail.com
Tue Oct 12 17:35:35 CEST 2010


I am comparing 2 files (.txt files) using filecmp.cmp(File1, File2, shallow=False)
 
I want to allow exceptions like these:
 
File 1                                  File 2 
6522,6523d6521          6591,6592d6590
 
6536d6533                  6605d6602
 
 So basically I want to ignore these differences while file comparison. Is there any easy way to do this..?

 

What I want to actually compare and be alerted for are any differences here :

  File 1                                                 File 2

< nor_ic -= pi.cConfig.Isthere ? 9 : 7;   < nor_ic -= pi.cConfig.Isthere ? 9 : 7;

> nor_ic -= 5;                                     > nor_ic -= 5; 


Thanks....

 


 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101012/98aed522/attachment.html>


More information about the Python-list mailing list