def pretty_filesize(file_bytes):
 for mod in [u'B', u'KB', u'MB', u'GB', u'TB', u'PB']:
  if (file_bytes < 1024.0):
   return (u'%3.2f %s' % (file_bytes, mod))
  file_bytes /= 1024.0

def pretty_filesize ( file_bytes ) : for mod in [ u'B' , u'KB' , u'MB' , u'GB' , u'TB' , u'PB' ] : if ( file_bytes < 1024.0 ) : return ( u'%3.2f %s' % ( file_bytes , mod ) ) file_bytes /= 1024.0
return humanly formatted sizes from bytes .