Hello, I've the following results from Difflib.Compare() which I want to parse them using the regular expression to find out the the values that have changed.
###################################################################### Testing DLL interface ###################################################################### Input File: c:\12.txt Config File: c:\abc.ini ###################################################################### Results:- ------- - Analysis Time (Iterations = 1) = 0.0449145s ? ^^ ^ + Analysis Time (Iterations = 1) = 0.0447347s ? ^^ ^ Width = 0.999989 Height = 0.044 - Length = 10 ? ^ + Length = 11 ? ^ End of Results ###################################################################### Testing DOTNET interface ###################################################################### Input File: c:\12.txt Config File: c:\abc.ini ####################################################################### Results:- ------- - Analysis Time (Iterations = 1) = 0.0449145s ? ^^ ^ + Analysis Time (Iterations = 1) = 0.0447347s ? ^^ ^ Width = 0.999989 Height = 0.044 - Length = 12 ? ^ + Length = 13 ? ^ End of Results ****** How Can I extract the headings out of this file? The headings are: ###################################################################### Testing DLL interface ###################################################################### Input File: c:\12.txt Config File: c:\abc.ini ###################################################################### < Here I want to display only the values that differ i.e. the lines prceded with +,?,- signs > ###################################################################### Testing DOTNET interface ###################################################################### Input File: c:\12.txt Config File: c:\abc.ini ####################################################################### I intent to show only the things that differ with their proper headings(as above) Please help me to get the heading stuff out. Regards, Rajat
-- http://mail.python.org/mailman/listinfo/python-list