mambo/core.py
def size_of(value):
        '''return the size of file formated'''
        for unit in ['', 'Ki', 'Mi']:
            if abs(value) < 1024.0:
                return "%3.1f %s%s" % (value, unit, 'B')
            value = value / 1024.0
        return "%.1f%s%s" % (value, 'Yi', 'B')
return the size of file formated
return the size of file formated
return the size of file formated
def size_of(value):
        for unit in ['', 'Ki', 'Mi']:
            if abs(value) < 1024.0:
                return "%3.1f %s%s" % (value, unit, 'B')
            value = value / 1024.0
        return "%.1f%s%s" % (value, 'Yi', 'B')
def size_of ( value ) : for unit in [ '' , 'Ki' , 'Mi' ] : if abs ( value ) < 1024.0 : return "%3.1f %s%s" % ( value , unit , 'B' ) value = value / 1024.0 return "%.1f%s%s" % ( value , 'Yi' , 'B' )
return the size of file formated
return the size of file formated
'''return the size of file formated'''
value