def human_readable_size(value):
 one_decimal_point = '%.1f'
 base = 1024
 bytes_int = float(value)
 if (bytes_int == 1):
  return '1 Byte'
 elif (bytes_int < base):
  return ('%d Bytes' % bytes_int)
 for (i, suffix) in enumerate(HUMANIZE_SUFFIXES):
  unit = (base ** (i + 2))
  if (round(((bytes_int / unit) * base)) < base):
   return ('%.1f %s' % (((base * bytes_int) / unit), suffix))

def human_readable_size ( value ) : one_decimal_point = '%.1f' base = 1024 bytes_int = float ( value ) if ( bytes_int == 1 ) : return '1 Byte' elif ( bytes_int < base ) : return ( '%d Bytes' % bytes_int ) for ( i , suffix ) in enumerate ( HUMANIZE_SUFFIXES ) : unit = ( base ** ( i + 2 ) ) if ( round ( ( ( bytes_int / unit ) * base ) ) < base ) : return ( '%.1f %s' % ( ( ( base * bytes_int ) / unit ) , suffix ) )
convert an size in bytes into a human readable format .