6.19.10.2.16.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[22 /42 ] Next Prev First Last
   724: #line 982 "input_frame.ipk"
   725:   def print_diff_table(self, comparison,
   726:     actual_heading='Actual', expected_heading='Expected',
   727:     ok_message='Data compared equal.',
   728:     diff_message='Differential follows.'):
   729: 
   730:     equal = len(comparison) == 0
   731:     our_weaver = self.get_weaver()
   732:     if not equal:
   733:       if diff_message:
   734:         our_weaver.writeline(diff_message)
   735:       our_weaver.begin_table('Actual','Expected', CLASS='DIFF')
   736:       for section in comparison:
   737:         left = section[0][1:]
   738:         right = section[1][1:]
   739:         left = string.join(left,'\n')
   740:         right = string.join(right,'\n')
   741:         our_weaver.table_row([left, right])
   742:       our_weaver.end_table()
   743:     else:
   744:       if ok_message:
   745:         our_weaver.writeline(ok_message)
   746: 
End python section to interscript/frames/inputf.py[22]