code: def format_sizeof(num, suffix='bytes'):
      '''Readable size format, courtesy of Sridhar Ratnakumar'''
      for unit in ['','K','M','G','T','P','E','Z']:
          if abs(num) < 1000.0:
              return "%3.1f%s%s" % (num, unit, suffix)
          num /= 1000.0
      return "%.1f%s%s" % (num, 'Y', suffixf format_sizeof(num, suffix='bytes'):
      '''Readable size format, courtesy of Sridhar Ratnakumar'''
      for unit in ['','K','M','G','T','P','E','Z']:
          if abs(num) < 1000.0:
              return "%3.1f%s%s" % (num, unit, suffix)
          num /= 1000.0
      return "%.1f%s%s" % (num, 'Y', suffix)
docs: Readable size format, courtesy of Sridhar Ratnakumar