Your IP : 216.73.216.196


Current Path : /opt/alt/python27/lib/python2.7/site-packages/humanize/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/humanize/filesize.pyc

�
�Sc	@s7dZidd	6dd6dd6Zeedd�ZdS(s"Bits & Bytes related humanization.tkBtMBtGBtTBtPBtEBtZBtYBtdecimaltKiBtMiBtGiBtTiBtPiBtEiBtZiBtYiBtbinarytKMGTPEZYtgnus%.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(
s�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.RRRii�is1 Bytes%d Bytess%dBis %ss%s(tsuffixestfloatt	enumerate(
tvalueRRtformattsuffixtbasetbytestitstunit((sB/opt/alt/python27/lib/python2.7/site-packages/humanize/filesize.pytnaturalsizes,


N(RRRRRRRR(R	R
RRR
RRR(t__doc__RtFalseR(((sB/opt/alt/python27/lib/python2.7/site-packages/humanize/filesize.pyt<module>s