6.13.10.2.15.2. Print diff table

Print out a diff table with side by side comparison of files. Requires the diff module. No table is generated if the files compare equal.
Start python section to interscript/frames/inputf.py[21 /40 ] Next Prev Last
   592: #line 860 "input_frame.ipk"
   593:   def print_diff_table(self, comparison,
   594:     actual_heading='Actual', expected_heading='Expected',
   595:     ok_message='Data compared equal.',
   596:     diff_message='Differential follows.'):
   597: 
   598:     equal = len(comparison) == 0
   599:     our_weaver = self.get_weaver()
   600:     if not equal:
   601:       if diff_message:
   602:         our_weaver.writeline(diff_message)
   603:       our_weaver.begin_table('Actual','Expected', CLASS='DIFF')
   604:       for section in comparison:
   605:         left = section[0][1:]
   606:         right = section[1][1:]
   607:         left = string.join(left,'\n')
   608:         right = string.join(right,'\n')
   609:         our_weaver.table_row([left, right])
   610:       our_weaver.end_table()
   611:     else:
   612:       if ok_message:
   613:         our_weaver.writeline(ok_message)
   614: 
End python section to interscript/frames/inputf.py[21]