def display_data_size(size):
 prefixes = ['B', 'kB', 'MB', 'GB', 'TB']
 i = 0
 while (size > 1000.0):
  size /= 1000.0
  i += 1
 return ('%.2f %s' % (size, prefixes[i]))

def display_data_size ( size ) : prefixes = [ 'B' , 'kB' , 'MB' , 'GB' , 'TB' ] i = 0 while ( size > 1000.0 ) : size /= 1000.0 i += 1 return ( '%.2f %s' % ( size , prefixes [ i ] ) )
display data size in human readable units .