Your IP : 216.73.216.196


Current Path : /opt/alt/python35/lib/python3.5/site-packages/humanize/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/humanize/__pycache__/filesize.cpython-35.pyc



�S��@s7dZddd
dddiZddddd�ZdS)z"Bits & Bytes related humanization.�decimal�kB�MB�GB�TB�PB�EB�ZB�YB�binary�KiB�MiB�GiB�TiB�PiB�EiB�ZiB�YiB�gnuZKMGTPEZYFz%.1fc
Cs^|rtd}n|r&td}n
td}|s<|rBdnd}t|�}|dkrk|rkdS||kr�|r�d|S||kr�|r�d	|Sx�t|�D]s\}}||d
}	||	kr�|r�|d|||	|fS||	kr�|r�|d|||	|fSq�W|rD|d|||	|fS|d|||	|fS)
a�Format a number of byteslike a human readable filesize (eg. 10 kB).  By
    default, decimal suffixes (kB, MB) are used.  Passing binary=true will use
    binary suffixes (KiB, MiB) are used and the base will be 2**10 instead of
    10**3.  If ``gnu`` is True, the binary argument is ignored and GNU-style
    (ls -sh style) prefixes are used (K, M) with the 2**10 definition.
    Non-gnu modes are compatible with jinja2's ``filesizeformat`` filter.rr
rii��z1 Bytez%d Bytesz%dB�z %sz%s)�suffixes�float�	enumerate)
�valuer
r�format�suffix�base�bytes�i�sZunit�r �B/opt/alt/python35/lib/python3.5/site-packages/humanize/filesize.py�naturalsizes,


r"N)rrrrrrrr	)rrr
rrrrr)�__doc__rr"r r r r!�<module>s