def diff(*args, **kwargs):
 import difflib
 bulk_ret = _get_pool_results(*args, **kwargs)
 is_first_time = True
 for k in bulk_ret:
  print('minion pool :\n------------')
  print(k['pool'])
  print('pool size :\n----------')
  print(('    ' + str(len(k['pool']))))
  if is_first_time:
   is_first_time = False
   print('pool result :\n------------')
   print(('    ' + bulk_ret[0]['result']))
   print()
   continue
  outs = 'differences from "{0}" results :'.format(bulk_ret[0]['pool'][0])
  print(outs)
  print(('-' * (len(outs) - 1)))
  from_result = bulk_ret[0]['result'].splitlines()
  for i in range(0, len(from_result)):
   from_result[i] += '\n'
  to_result = k['result'].splitlines()
  for i in range(0, len(to_result)):
   to_result[i] += '\n'
  outs = ''
  outs += ''.join(difflib.unified_diff(from_result, to_result, fromfile=bulk_ret[0]['pool'][0], tofile=k['pool'][0], n=0))
  print(outs)
  print()
 return bulk_ret

def diff ( * args , ** kwargs ) : import difflib bulk_ret = _get_pool_results ( * args , ** kwargs ) is_first_time = True for k in bulk_ret : print ( 'minion pool :\n------------' ) print ( k [ 'pool' ] ) print ( 'pool size :\n----------' ) print ( ( '    ' + str ( len ( k [ 'pool' ] ) ) ) ) if is_first_time : is_first_time = False print ( 'pool result :\n------------' ) print ( ( '    ' + bulk_ret [ 0 ] [ 'result' ] ) ) print ( ) continue outs = 'differences from "{0}" results :' . format ( bulk_ret [ 0 ] [ 'pool' ] [ 0 ] ) print ( outs ) print ( ( '-' * ( len ( outs ) - 1 ) ) ) from_result = bulk_ret [ 0 ] [ 'result' ] . splitlines ( ) for i in range ( 0 , len ( from_result ) ) : from_result [ i ] += '\n' to_result = k [ 'result' ] . splitlines ( ) for i in range ( 0 , len ( to_result ) ) : to_result [ i ] += '\n' outs = '' outs += '' . join ( difflib . unified_diff ( from_result , to_result , fromfile = bulk_ret [ 0 ] [ 'pool' ] [ 0 ] , tofile = k [ 'pool' ] [ 0 ] , n = 0 ) ) print ( outs ) print ( ) return bulk_ret
compare two whisper databases .