KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/yum/i18n.pyc
m
Pc@sWdZdZdZdZdZdZdZddZde	ddd	Z
d
ZdZdddd
Z
dZdddZddZdddZdZe	oeZeZnKy4dkZeidde	ZeiZeiZWneZeZnXedjo%dkZdZdGHxeidD]ZeeqSWdGHxHeidD]9ZyeeZWnej
o
qznXeeqzWe eidjodGHeeideiddGHy+eeide!eeidZWn ej
oei"d nXeeqSndS(!cCs
t|S(sD
    Dummy Translation wrapper, just returning the same string.
    N(t
to_unicodetstr(R((t,/usr/lib/python2.4/site-packages/yum/i18n.pyt
dummy_wrapperscCs|djo|Sn|SdS(s]
    Dummy Plural Translation wrapper, just returning the singular or plural
    string.
    iN(tntstr1tstr2(RRR((RtdummyP_wrappers
cCsd}t|d}|||djp|||djotSnxj||jo\||d}|||djo|d}qK|||djo|d}qKtSqKWtS(s9 auxiliary function for binary search in interval table. iiiN(tmintlenttabletmaxtucstFalsetmidtTrue(RR
RRR((Rt__utf8_bisearchBs*
	cCsddfddfddfddfd	d	fd
dfdd
fddfddfddfddfddfddfddfddfddfddfddfd d!fd"d#fd$d%fd&d&fd'd(fd)d)fd*d+fd,d-fd.d.fd/d/fd0d1fd2d2fd3d4fd5d6fd7d7fd8d9fd:d;fd<d=fd>d?fd@dAfdBdBfdCdDfdEdFfdGdGfdHdIfdJdJfdKdKfdLdLfdMdNfdOdOfdPdPfdQdQfdRdRfdSdSfdTdUfdVdWfdXdYfdZd[fd\d\fd]d]fd^d^fd_d`fdadbfdcddfdedefdfdffdgdhfdidifdjdjfdkdlfdmdnfdodofdpdqfdrdsfdtdufdvdwfdxdxfdydyfdzdzfd{d|fd}d~fddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfddfg}|djodSn|djp|djo
|djodSnt||odSnd|djo|djp|djp|djp|djo|djo
|djp|djo
|djp|djo
|djp|djo
|djp|djo
|djpe|djo
|djpK|djo
|djp1|djo
|djp|djo
|djSd	S(
s+ Get the textual width of a ucs character. iioiiiiiiiiiiiiiiiiiKi^ipiiiiiiiii0iJiiiii	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?iAiCiMiViiii>i@iFiHiJiMiUiViiiiiiiiA
iC
iM
i
i
i
i
i1i4i:iGiNiiiiiiiiii5i7i9iqi~iiiiiiiiii-i0i2i6i7i9iXiYi`ii_iii2i4iRiSirisiiiiiiiiii
ii i"i'i(i2i9i;iiiii4i6i:i<iBikisiiiii i i* i. i` ic ij io i i i*0i/0i0i0iii%i&iiii i#iiii
i
i
i
i
i
i8
i:
i?
igiiisiiiiiiBiDii iiiii iiiiii_i)#i*#i.iϤi?0iiiiiii0ioii`iiiiiiN(t	combiningRR(RR((Rt__utf8_ucp_widthUs	3
'ccs%xt|D]}t|Vq
WdS(N(tto_utf8tmsgtbytetord(RR((Rt__utf8_iter_intss
ccst|}xq|D]i}|djo|dfVq|d@djoX|i}|d@djp|d@djodVdSn|d@d>|d	@BdfVq|d
@djo|i}|i}|d@djpx|d@djpg|djo|d@djpI|djo|d@djp+|d
jo*|djo|d@djodVdSn|d@d>|d	@d>B|d	@BdfVq|d@d
jo|i}|i}|i}|d@djpg|d@djpV|d@djpE|d
jo|d
@djp'|djo
|djp
|djodVdSn|d@d>|d	@d>B|d	@d>B|d	@BdfVqdVdSqWdS(Niiiiiiiii?iiiiiiiiiiiiiii(Ni(Ni(Ni(Ni(	RRtuitertbyte0tnexttbyte1tNonetbyte2tbyte3(RRRRRR((Rt__utf8_iter_ucss8
"*x6cCsRd}xEt|D]7\}}|djo||7}q|t|7}qW|S(s) Get the textual width of a utf8 string. iN(tretRRRtbytesRR(RRR!R ((Rt
utf8_widths

cCs|djpt||jot||fSnd}t|t}d}t	|}x~t
|D]p\}}|djo
|}n
t|}|dj	o |||jo|| }Pn||7}||7}qhW|ot|}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(tchopRR"RR t
isinstancetunicodetpassed_unicodet	msg_bytesRRRR!twidthRR(RR#RR&R!R R(R'((Rtutf8_width_chops( 




tc	Cs|}t||\}}||jo.|p|odi|||g}qnPd||}|odi||||g}ndi||||g}t|tot
|Sn|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 N(Rt
passed_msgR)R#R(tfilltprefixtsuffixtjointextratleftR$R%R(	RR-R#R2R.R/R1R(R,((Rtutf8_width_fills
 cCs6x/t|D]!\}}|djotSq
q
WtS(s. Return True/False is the text is valid utf8. N(RRRR!RR
R(RR!R((Rt
utf8_valid"s

cGsmd}x|D]}|t|7}q
W||jotSnd}x|D]}|t|7}qIW||jS(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. iN(R targstargR	R(RR"(R(R5R R6((Rt_utf8_width_le)s
iFcst|t}	dt|}t|}t|id}t|i	dddi
d}g}|}t}d}d}x#|D]}|id}||}}|\}}t}|o|o
t}n|o|t|jo
t}n|o0|o(|djo||jo
t}q?n|o&|i|id|}t}n|t|jo
d}n|o|id}|}nt|||o$t}|i|||}qnt}|i
d}
|}|}|o|djo
|}nxw|
D]o}
t|||
oAt|t|jo(|i|id|d|}n||
7}|d7}q'W|idd}qW|o|i|idn|	ot t!|Sn|S(
sl Works like we want textwrap.wrap() to work, uses utf-8 data and
        doesn't screw up lists/blocks/etc. csd}d}x*|D]"}|djoPn|d7}qW|d
jo|dfSnt||dd}|djoP||t|}|dp|d}|o||d|fSqn|dfS(NitXR+it-t*t.toss•s‣s∘(R9R:R;R<s(R9R:R;R<s•s‣s∘(tcountRtlineR)tlist_chrt_indent_at_begR	tnxt(R>R=RAR?R(R@(RR@Ts 


s
s	R+iiiR*N("R$ttextR%R&R@Rtinitial_indenttsubsequent_indenttrstriptreplacetsplittlinesR tindentR
t	wrap_lasttcsabtcspc_indentR>tlsabtlspc_indenttforce_nlRR	tappendtlstripR7R(twordstspcstwordR"tmapR(RBR(RCRDRJRKR R@RSR&RTRORLRRRIR>RNRMRH((R@Rtutf8_text_wrapAst%






-
cOsdit|||S(sl Works like we want textwrap.fill() to work, uses utf-8 data and
        doesn't screw up lists/blocks/etc. s
N(R0RVRBR5tkwargs(RBR5RW((Rtutf8_text_fillssutf-8RFcCs>t|to*t|tpt|||}q:n|S(s convert a 'str' to 'unicode' N(R$tobjt
basestringR%tencodingterrors(RYR[R\((RRs
cCs*t|to|id|}n|S(s2convert 'unicode' to an encoded utf-8 byte string sutf-8N(R$RYR%tencodeR\(RYR\((RRscCs2yt|||SWntj
o|SnXdS(s. Don't ask don't tell, only use when you must N(RRYR[R\tUnicodeEncodeError(RYR[R\((Rtto_unicode_maybes
cCs$t|tpt|}n|S(s1 Convert something to a string, if it isn't one. N(R$RYRZR(RY((Rtto_strsNtyumtfallbackt__main__cCst|}dG|GHdGt|GHt|}dG|GHdGt|GHdGt|GHdGt|GHdGddt|d	d
dfGHdGddt|d	d
dfGHdGddt|d	ddfGHdGddt|d	ddfGHdGddt|d
d
dfGHdGddt|d
ddfGHdGddt|d
ddfGHdGddt|dddfGHdGddt|dddfGHdGHdS(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*(RR6R	RR4R"R3(R6((Rtouts$		"""""""""s ---- Arguments/str ---- is ---- Arguments/gettext ---- is ---- Arguments/str/all ---- s! ---- Arguments/gettext/all ---- i(#RRRRRRR"RR)RR3R4R7RVRXRRR_R`t_tP_tgettextttranslationtttugettextt	ungettextt__name__tsysRftargvR6tUnicodeDecodeErrorR	RUtexit(RRR3RRVR4RXR6RR_RfRRhRiRoRRgRR)R`RkR"RR7((Rt?sj		+		R		+	
%		a		
		


		+

Anon7 - 2021