@verbose
def compare_fiff(fname_1, fname_2, fname_out=None, show=True, indent='    ', read_limit=np.inf, max_str=30, verbose=None):
 file_1 = show_fiff(fname_1, output=list, indent=indent, read_limit=read_limit, max_str=max_str)
 file_2 = show_fiff(fname_2, output=list, indent=indent, read_limit=read_limit, max_str=max_str)
 diff = difflib.HtmlDiff().make_file(file_1, file_2, fname_1, fname_2)
 if (fname_out is not None):
  f = open(fname_out, 'wb')
 else:
  f = tempfile.NamedTemporaryFile('wb', delete=False, suffix='.html')
  fname_out = f.name
 with f as fid:
  fid.write(diff.encode('utf-8'))
 if (show is True):
  webbrowser.open_new_tab(fname_out)
 return fname_out

@ verbose def compare_fiff ( fname_1 , fname_2 , fname_out = None , show = True , indent = '    ' , read_limit = np . inf , max_str = 30 , verbose = None ) : file_1 = show_fiff ( fname_1 , output = list , indent = indent , read_limit = read_limit , max_str = max_str ) file_2 = show_fiff ( fname_2 , output = list , indent = indent , read_limit = read_limit , max_str = max_str ) diff = difflib . HtmlDiff ( ) . make_file ( file_1 , file_2 , fname_1 , fname_2 ) if ( fname_out is not None ) : f = open ( fname_out , 'wb' ) else : f = tempfile . NamedTemporaryFile ( 'wb' , delete = False , suffix = '.html' ) fname_out = f . name with f as fid : fid . write ( diff . encode ( 'utf-8' ) ) if ( show is True ) : webbrowser . open_new_tab ( fname_out ) return fname_out
compare the contents of two fiff files using diff and show_fiff .