6.10.10.2.14.2. Print diff table

6.10.10.2.14.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[19]
   469: #line 726 "input_frame.ipk"
   470:   def print_diff_table(self, comparison,
   471:     actual_heading='Actual', expected_heading='Expected',
   472:     ok_message='Data compared equal.',
   473:     diff_message='Differential follows.'):
   474: 
   475:     equal = len(comparison) == 0
   476:     our_weaver = self.get_weaver()
   477:     if not equal:
   478:       if diff_message:
   479:         our_weaver.writeline(diff_message)
   480:       our_weaver.begin_table('Actual','Expected', CLASS='DIFF')
   481:       for section in comparison:
   482:         left = section[0][1:]
   483:         right = section[1][1:]
   484:         left = string.join(left,'\n')
   485:         right = string.join(right,'\n')
   486:         our_weaver.table_row([left, right])
   487:       our_weaver.end_table()
   488:     else:
   489:       if ok_message:
   490:         our_weaver.writeline(ok_message)
   491: 
End python section to interscript/frames/inputf.py[19]