ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/yum/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/yum/i18n.pyc

�
8M�bc�@s<d�Zd�Zd�Zddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�f�Zd��Zd��Zd��Zd��Zdd��Z	de
d�d�d��Zd��Zd��Z
d�d�d�d��Zd��Zd�d�d��Zd�d��Zd�d�d��Zd��Zd�Zd�ZysddlZejdde
�ZejZejZddlZejejkr�ejdde
�je_nWneZeZnXedkr8ddlZd�Z d	GHxej!d
D]Z"e e"�q?WdGHxFej!d
D]7Z"yee"�Z"Wne#k
r�qfnXe e"�qfWe$ej!�dkr8d
GHe ej!d
ej!d�dGHy+eej!d
�e%eej!d�Z"Wne#k
r'ej&d�nXe e"�q8ndS(�cCs
t|�S(sD
    Dummy Translation wrapper, just returning the same string.
    (t
to_unicode(tstr((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt
dummy_wrapperscCs|dkr|S|SdS(s]
    Dummy Plural Translation wrapper, just returning the singular or plural
    string.
    iN((tstr1tstr2tn((s,/usr/lib/python2.7/site-packages/yum/i18n.pytdummyP_wrapperscCs�d}t|�d}|||dks>|||dkrBtSxd||kr�||d}|||dkr�|d}qE|||dkr�|d}qEtSqEWtS(s9 auxiliary function for binary search in interval table. iii(tlentFalsetTrue(tucsttabletmintmaxtmid((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt__utf8_bisearchBs(

iioi�i�i�i�i�i�i�i�i�i�i�i�iiiiiKi^ipi�i�i�i�i�i�iii0iJi�i�i�i�i	i	i<	iA	iH	iM	iQ	iT	ib	ic	i�	i�	i�	i�	i�	i�	i�	i
i
i<
iA
iB
iG
iH
iK
iM
ip
iq
i�
i�
i�
i�
i�
i�
i�
i�
i�
i�
ii<i?iAiCiMiVi�i�i�i>i@iFiHiJiMiUiVi�i�i�i�i�i�i�iA
iC
iM
i�
i�
i�
i�
i1i4i:iGiNi�i�i�i�i�i�i�iii5i7i9iqi~i�i�i�i�i�i�i�i�i�i-i0i2i6i7i9iXiYi`i�i_iii2i4iRiSirisi�i�i�i�i�i�i�i�ii
i�i i"i'i(i2i9i;iiiii4i6i:i<iBikisi�i�i�i�i i i* i. i` ic ij io i� i� i*0i/0i�0i�0i�i�i%�i&�i�i�i�i �i#�i��i��i��i
i
i
i
i
i
i8
i:
i?
ig�ii�is�i��i��i��i��i��iB�iD�ii iii�cCsa|dkrdS|dks4|dkr8|dkr8dSt|t�rKdSd|dko_|dkp_|d	kp_|d
kp_|dkr�|dkr�|d
kp_|dkr�|dkp_|dkr�|dkp_|dkr�|dkp_|dkr|dkp_|dkr|dkp_|dkr2|dkp_|dkrJ|dkp_|dko_|dkS(s+ Get the textual width of a ucs character. ii ii�i����iii_i)#i*#i�.iϤi?0i�i��i�i��i�i�i0�io�i�i`�i�i�ii��ii��(Rt__combining(R
((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt__utf8_ucp_width�s($ccs&xt|�D]}t|�Vq
WdS(N(tto_utf8tord(tmsgtbyte((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt__utf8_iter_ints�sccset|�}xR|D]J}|dkr3|dfVq|d@dkr�|j�}|d@dkso|d@dkrxdVdS|d@d>|d	@BdfVq|d
@dkrq|j�}|j�}|d@dks>|d@dks>|dkr�|d@dks>|dkr|d@dks>|d
krG|dkrG|d@dkrGdVdS|d@d>|d	@d>B|d	@BdfVq|d@d
krT|j�}|j�}|j�}|d@dks|d@dks|d@dks|d
kr�|d
@dks|dkr	|dks|dkrdVdS|d@d>|d	@d>B|d	@d>B|d	@BdfVqdVdSqWdS(Ni�ii�i�i�iiii?i�i�i�i�i�i�iiii�i�i�iii(Ni(Ni(Ni(Ni(RtnexttNone(Rtuitertbyte0tbyte1tbyte2tbyte3((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt__utf8_iter_ucs�sL
 6cCsPd}xCt|�D]5\}}|dkr8||7}q|t|�7}qW|S(s) Get the textual width of a utf8 string. iN(RRR(RtretR
tbytes((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt
utf8_width�s
cCs�|dkst|�|kr.t|�|fSd}t|t�}d}t|�}xyt|�D]k\}}|dkr�|}nt|�}|dk	r�|||kr�|| }Pn||7}||7}qbW|r�t|�}n||fS(s Return the textual width of a utf8 string, chopping it to a specified
        value. This is what you want to use instead of %.*s, as it does the
        "right" thing with regard to utf-8 sequences. Eg.
        "%.*s" % (10, msg)   <= becomes => "%s" % (utf8_width_chop(msg, 10)) iN(RR!t
isinstancetunicodeRRRR(RtchopRtpassed_unicodet	msg_bytesR
R twidth((s,/usr/lib/python2.7/site-packages/yum/i18n.pytutf8_width_chop�s$	

tc	Cs�|}t||�\}}||krQ|s3|r�dj|||g�}q�nMd||}|r�dj||||g�}ndj||||g�}t|t�r�t|�S|S(s� Expand a utf8 msg to a specified "width" or chop to same.
        Expansion can be left or right. This is what you want to use instead of
        %*.*s, as it does the "right" thing with regard to utf-8 sequences.
        prefix and suffix should be used for "invisible" bytes, like
        highlighting.
        Eg.
        "%-*.*s" % (10, 20, msg)
           <= becomes =>
        "%s" % (utf8_width_fill(msg, 10, 20)).

        "%20.10s" % (msg)
           <= becomes =>
        "%s" % (utf8_width_fill(msg, 20, 10, left=False)).

        "%s%.10s%s" % (prefix, msg, suffix)
           <= becomes =>
        "%s" % (utf8_width_fill(msg, 0, 10, prefix=prefix, suffix=suffix)).
        R)t (R(tjoinR"R#R(	RtfillR$tlefttprefixtsuffixt
passed_msgR'textra((s,/usr/lib/python2.7/site-packages/yum/i18n.pytutf8_width_fill�s
cCs1x*t|�D]\}}|dkr
tSq
WtS(s. Return True/False is the text is valid utf8. N(RRRR	(RR
R ((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt
utf8_valid$scGshd}x|D]}|t|�7}q
W||kr7tSd}x|D]}|t|�7}qDW||kS(s{ Minor speed hack, we often want to know "does X fit in Y". It takes
        "a while" to work out a utf8_width() (see above), and we know that a
        utf8 character is always <= byte. So given:

        assert bytes >= characters
        characters <= width?

        ...we can change to:

        bytes <= width or characters <= width

        ...and bytes are much faster. i(RR	R!(R'targsRtarg((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt_utf8_width_le+s

iFcs�t|t�}�fd��t|�}t|�}t|�jd�}t|�jdd	�jd�}g}|}t}d}	d}
x	|D]}|jd�}|	|
}}
�|�\}	}
t}|r�|
r�t}n|r|	t|�krt}n|r2|
r2|	dkr2|	|kr2t}q2n|r]|j	|jd��|}t}n|	t|�krxd}n|r�|j
d�}|
}
nt|||�r�t}|j	||�|}q�nt}|jd�}|}|
}|r|	dkr|	}nxt|D]l}t|||�rgt|�t|�krg|j	|jd��|d|}n||7}|d7}qW|jd�d}q�W|r�|j	|jd��n|r�t
t|�S|S(
sl Works like we want textwrap.wrap() to work, uses utf-8 data and
        doesn't screw up lists/blocks/etc. cs�d}d}x(|D] }|dkr)Pn|d7}qW|d
krM|dfSt||d�d}|dkr��||t|��}|dp�|d}|r�||d|fSn|dfS(NitXR*it-t*t.tos�s•s‣s∘(R8R9R:R;s�(R8R9R:R;s•s‣s∘(R(R(tlinetcountRtlist_chrtnxt(t_indent_at_beg(s,/usr/lib/python2.7/site-packages/yum/i18n.pyR@Vs 

	s
s	R*iiiR)s        (R"R#RtrstriptreplacetsplitRR	RtappendtlstripR6R!tmapR(ttextR'tinitial_indenttsubsequent_indentR%tlinesRtindentt	wrap_lasttcsabtcspc_indentR<tlsabtlspc_indenttforce_nltwordstspcstword((R@s,/usr/lib/python2.7/site-packages/yum/i18n.pytutf8_text_wrapCsp!

		
				


cOsdjt|||��S(sl Works like we want textwrap.fill() to work, uses utf-8 data and
        doesn't screw up lists/blocks/etc. s
(R+RU(RGR4tkwargs((s,/usr/lib/python2.7/site-packages/yum/i18n.pytutf8_text_fill�ssutf-8RBcCs:t|t�r6t|t�s6t|||�}q6n|S(s convert a 'str' to 'unicode' (R"t
basestringR#(tobjtencodingterrors((s,/usr/lib/python2.7/site-packages/yum/i18n.pyR�scCs(t|t�r$|jd|�}n|S(s2convert 'unicode' to an encoded utf-8 byte string sutf-8(R"R#tencode(RYR[((s,/usr/lib/python2.7/site-packages/yum/i18n.pyR�scCs-yt|||�SWntk
r(|SXdS(s. Don't ask don't tell, only use when you must N(RtUnicodeEncodeError(RYRZR[((s,/usr/lib/python2.7/site-packages/yum/i18n.pytto_unicode_maybe�s
cCs"t|t�st|�}n|S(s1 Convert something to a string, if it isn't one. (R"RXR(RY((s,/usr/lib/python2.7/site-packages/yum/i18n.pytto_str�scCsQt|t�t|t�kr1||krMtSnt|�t|�krMtStS(sP convert between unicode and not and compare them, w/o warning or being annoying(R"R#R	RR(tatb((s,/usr/lib/python2.7/site-packages/yum/i18n.pytstr_eq�scCsUyt|j�SWnnXyt|�SWnnXytt|��SWnnXdS(s�Convert an exception to a message.  This function will convert
    the exception using to_unicode, unicode, or str, whichever works correctly.

    :param e: an exception
    :return: a string representation of the exception
    s%<exception failed to convert to text>(RtvalueR#R(te((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt
exception2msg�si����Ntyumtfallbacktmessagest__main__cCs�t|�}dG|GHdGt|�GHt|�}dG|GHdGt|�GHdGt|�GHdGt|�GHdGddt|d	d
�dfGHdGddt|d	d
�dfGHdGddt|d	d�dfGHdGddt|d	d�dfGHdGddt|d
d
�dfGHdGddt|d
d�dfGHdGddt|d
d�dfGHdGddt|dd�dfGHdGddt|dd�dfGHdGHdS(NsUTF8 :slen  :sUSC  :svalid:swidth:s4.8  :s%s%s%st<iit>s4.3  :is4.2  :is4.1  :is3.3  :s3.2  :s3.1  :s40.79:i(iOs40.20:iR)(RRRR3R!R2(R5((s,/usr/lib/python2.7/site-packages/yum/i18n.pytout
s$		"""""""""s ---- Arguments/str ---- is ---- Arguments/gettext ---- is ---- Arguments/str/all ---- s! ---- Arguments/gettext/all ---- i(iio(i�i�(i�i�(i�i�(i�i�(i�i�(i�i�(i�i�(ii(ii(iKi^(ipip(i�i�(i�i�(i�i�(ii(ii(i0iJ(i�i�(i�i�(i	i	(i<	i<	(iA	iH	(iM	iM	(iQ	iT	(ib	ic	(i�	i�	(i�	i�	(i�	i�	(i�	i�	(i�	i�	(i
i
(i<
i<
(iA
iB
(iG
iH
(iK
iM
(ip
iq
(i�
i�
(i�
i�
(i�
i�
(i�
i�
(i�
i�
(i�
i�
(ii(i<i<(i?i?(iAiC(iMiM(iViV(i�i�(i�i�(i�i�(i>i@(iFiH(iJiM(iUiV(i�i�(i�i�(i�i�(i�i�(i�i�(iA
iC
(iM
iM
(i�
i�
(i�
i�
(i�
i�
(i1i1(i4i:(iGiN(i�i�(i�i�(i�i�(i�i�(ii(i5i5(i7i7(i9i9(iqi~(i�i�(i�i�(i�i�(i�i�(i�i�(i-i0(i2i2(i6i7(i9i9(iXiY(i`i�(i_i_(ii(i2i4(iRiS(iris(i�i�(i�i�(i�i�(i�i�(i�i�(ii
(i�i�(i i"(i'i((i2i2(i9i;(ii(ii(i4i4(i6i:(i<i<(iBiB(ikis(i�i�(i�i�(i i (i* i. (i` ic (ij io (i� i� (i*0i/0(i�0i�0(i�i�(i�i�(i%�i&�(i�i�(i�i�(i �i#�(i��i��(i��i��(i
i
(i
i
(i
i
(i8
i:
(i?
i?
(ig�ii�(is�i��(i��i��(i��i��(iB�iD�(ii(i i(ii�('RRRRRRRR!RR(R	R2R3R6RURWRRR^R_RbRetgettextttranslationtttugettextt_t	ungettexttP_toptparset__name__tsysRltargvR5tUnicodeDecodeErrorRRFtexit(((s,/usr/lib/python2.7/site-packages/yum/i18n.pyt<module>s�		+																																																				+	
%		a			
			"
	
+


Zerion Mini Shell 1.0