(self)
return "{0:.2f} {1:s}".format(size, unit)
:return: A string of the human readible size for the device.
:return: A string of the human readible size for the device.
: return : A string of the human readible size for the device .
def size_hr(self):
        """
        :return: A string of the human readible size for the device.
        """
        units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']
        unit = units.pop(0)
        size = self.size
        while units and size > 1024:
            size /= 1024.0
            unit = units.pop(0)
        return "{0:.2f} {1:s}".format(size, unit)
def size_hr ( self ) : units = [ 'B' , 'KB' , 'MB' , 'GB' , 'TB' , 'PB' , 'EB' ] unit = units . pop ( 0 ) size = self . size while units and size > 1024 : size /= 1024.0 unit = units . pop ( 0 ) return "{0:.2f} {1:s}" . format ( size , unit )