ok

Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/opt/alt/python27/lib64/python2.7/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/opt/alt/python27/lib64/python2.7/string.pyc

�
\
bc@s�dZdZdZdZeeZeZeZeeZdZeddZ	dZ
dZeeeeZe
eed	��Zed
�je�Z[dd�Zdad�Zd
dlZdd4d��YZdefd��YZdd5d��YZeZeZ eZ!eZ"d�Z#d�Z$d�Z%dd�Z&dd�Z'dd�Z(dd
d�Z)e)Z*dd
d�Z+dd�ZeZ,d�Z-d �Z.d!�Z/d"�Z0d#�Z1e2Z3e4Z5e6Z7d$�Z8d%d&�Z9d%d'�Z:d(�Z;d)�Z<d*�Z=d+�Z>d,d-�Z?d
d.�Z@d/�ZAd
d0�ZBy0d
d1lCmZmZmZmZeeZWneDk
r{nXd2eEfd3��YZFdS(6s�A collection of string operations (most are no longer used).

Warning: most of the code you see here isn't normally used nowadays.
Beginning with Python 1.6, many of these functions are implemented as
methods on the standard string object. They used to be implemented by
a built-in module called strop, but strop is now obsolete itself.

Public module variables:

whitespace -- a string containing all characters considered whitespace
lowercase -- a string containing all characters considered lowercase letters
uppercase -- a string containing all characters considered uppercase letters
letters -- a string containing all characters considered letters
digits -- a string containing all characters considered decimal digits
hexdigits -- a string containing all characters considered hexadecimal digits
octdigits -- a string containing all characters considered octal digits
punctuation -- a string containing all characters considered punctuation
printable -- a string containing all characters considered printable

s 	

tabcdefghijklmnopqrstuvwxyztABCDEFGHIJKLMNOPQRSTUVWXYZt
0123456789tabcdeftABCDEFt01234567s !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~itcCs&|p	djd�|j|�D��S(s�capwords(s [,sep]) -> string

    Split the argument into words using split, capitalize each
    word using capitalize, and join the capitalized words using
    join.  If the optional second argument sep is absent or None,
    runs of whitespace characters are replaced by a single space
    and leading and trailing whitespace are removed, otherwise
    sep is used to split and join the words.

    t css|]}|j�VqdS(N(t
capitalize(t.0tx((s+/opt/alt/python27/lib64/python2.7/string.pys	<genexpr>8s(tjointsplit(tstsep((s+/opt/alt/python27/lib64/python2.7/string.pytcapwords-scCs�t|�t|�kr$td�nts9tt�ant}tt|�}x,tt|��D]}|||||<qbWdj|�S(s�maketrans(frm, to) -> string

    Return a translation table (a string of 256 bytes long)
    suitable for use in string.translate.  The strings frm and to
    must be of the same length.

    s)maketrans arguments must have same lengthR(	tlent
ValueErrort_idmapLtlistt_idmaptmaptordtrangeR(tfromstrttostrtLti((s+/opt/alt/python27/lib64/python2.7/string.pyt	maketrans=si����Nt	_multimapcBs eZdZd�Zd�ZRS(s�Helper class for combining multiple mappings.

    Used by .{safe_,}substitute() to combine the mapping and keyword
    arguments.
    cCs||_||_dS(N(t_primaryt
_secondary(tselftprimaryt	secondary((s+/opt/alt/python27/lib64/python2.7/string.pyt__init__[s	cCs/y|j|SWntk
r*|j|SXdS(N(RtKeyErrorR(R tkey((s+/opt/alt/python27/lib64/python2.7/string.pyt__getitem___s
(t__name__t
__module__t__doc__R#R&(((s+/opt/alt/python27/lib64/python2.7/string.pyRUs	t_TemplateMetaclasscBseZdZd�ZRS(s/
    %(delim)s(?:
      (?P<escaped>%(delim)s) |   # Escape sequence of two delimiters
      (?P<named>%(id)s)      |   # delimiter and a Python identifier
      {(?P<braced>%(id)s)}   |   # delimiter and a braced identifier
      (?P<invalid>)              # Other ill-formed delimiter exprs
    )
    cCs�tt|�j|||�d|kr4|j}n*tjitj|j�d6|jd6}tj|tj	tj
B�|_dS(Ntpatterntdelimtid(tsuperR*R#R+t_retescapet	delimitert	idpatterntcompilet
IGNORECASEtVERBOSE(tclstnametbasestdctR+((s+/opt/alt/python27/lib64/python2.7/string.pyR#ps	(R'R(R+R#(((s+/opt/alt/python27/lib64/python2.7/string.pyR*fstTemplatecBsDeZdZeZdZdZd�Zd�Zd�Z	d�Z
RS(s.A string class for supporting $-substitutions.t$s[_a-z][_a-z0-9]*cCs
||_dS(N(ttemplate(R R<((s+/opt/alt/python27/lib64/python2.7/string.pyR#�scCs}|jd�}|j| jt�}|s:d}d}n)|tdj|d ��}t|�}td||f��dS(NtinvalidiRi����s.Invalid placeholder in string: line %d, col %d(tstartR<t
splitlinestTrueRRR(R tmoRtlinestcolnotlineno((s+/opt/alt/python27/lib64/python2.7/string.pyt_invalid�s	cs�|std��n|d|d�}t|�dkrKtd��n|sZ|�n&|rvt||d��n
|d���fd�}�jj|�j�S(Ns>descriptor 'substitute' of 'Template' object needs an argumentiisToo many positional argumentscs�|jd�p|jd�}|dk	r?�|}d|fS|jd�dk	r[�jS|jd�dk	r��j|�ntd�j��dS(Ntnamedtbraceds%stescapedR=s#Unrecognized named group in pattern(tgrouptNoneR1RERR+(RARFtval(tmappingR (s+/opt/alt/python27/lib64/python2.7/string.pytconvert�s
(t	TypeErrorRRR+tsubR<(targstkwsRM((RLR s+/opt/alt/python27/lib64/python2.7/string.pyt
substitute�s	
cs�|std��n|d|d�}t|�dkrKtd��n|sZ|�n&|rvt||d��n
|d���fd�}�jj|�j�S(NsCdescriptor 'safe_substitute' of 'Template' object needs an argumentiisToo many positional argumentscs�|jd�p|jd�}|dk	r[yd�|fSWq[tk
rW|j�SXn|jd�dk	rw�jS|jd�dk	r�|j�Std�j��dS(NRFRGs%sRHR=s#Unrecognized named group in pattern(RIRJR$R1RR+(RARF(RLR (s+/opt/alt/python27/lib64/python2.7/string.pyRM�s

(RNRRR+ROR<(RPRQRM((RLR s+/opt/alt/python27/lib64/python2.7/string.pytsafe_substitute�s	
(R'R(R)R*t
__metaclass__R1R2R#RERRRS(((s+/opt/alt/python27/lib64/python2.7/string.pyR:|s			cCs
|j�S(sSlower(s) -> string

    Return a copy of the string s converted to lowercase.

    (tlower(R
((s+/opt/alt/python27/lib64/python2.7/string.pyRU�scCs
|j�S(sSupper(s) -> string

    Return a copy of the string s converted to uppercase.

    (tupper(R
((s+/opt/alt/python27/lib64/python2.7/string.pyRV�scCs
|j�S(s�swapcase(s) -> string

    Return a copy of the string s with upper case characters
    converted to lowercase and vice versa.

    (tswapcase(R
((s+/opt/alt/python27/lib64/python2.7/string.pyRW�scCs
|j|�S(sstrip(s [,chars]) -> string

    Return a copy of the string s with leading and trailing
    whitespace removed.
    If chars is given and not None, remove characters in chars instead.
    If chars is unicode, S will be converted to unicode before stripping.

    (tstrip(R
tchars((s+/opt/alt/python27/lib64/python2.7/string.pyRX�s	cCs
|j|�S(s�lstrip(s [,chars]) -> string

    Return a copy of the string s with leading whitespace removed.
    If chars is given and not None, remove characters in chars instead.

    (tlstrip(R
RY((s+/opt/alt/python27/lib64/python2.7/string.pyRZscCs
|j|�S(s�rstrip(s [,chars]) -> string

    Return a copy of the string s with trailing whitespace removed.
    If chars is given and not None, remove characters in chars instead.

    (trstrip(R
RY((s+/opt/alt/python27/lib64/python2.7/string.pyR[scCs|j||�S(srsplit(s [,sep [,maxsplit]]) -> list of strings

    Return a list of the words in the string s, using sep as the
    delimiter string.  If maxsplit is given, splits at no more than
    maxsplit places (resulting in at most maxsplit+1 words).  If sep
    is not specified or is None, any whitespace string is a separator.

    (split and splitfields are synonymous)

    (R(R
Rtmaxsplit((s+/opt/alt/python27/lib64/python2.7/string.pyRscCs|j||�S(sWrsplit(s [,sep [,maxsplit]]) -> list of strings

    Return a list of the words in the string s, using sep as the
    delimiter string, starting at the end of the string and working
    to the front.  If maxsplit is given, at most maxsplit splits are
    done. If sep is not specified or is None, any whitespace string
    is a separator.
    (trsplit(R
RR\((s+/opt/alt/python27/lib64/python2.7/string.pyR]*s	RcCs
|j|�S(s�join(list [,sep]) -> string

    Return a string composed of the words in list, with
    intervening occurrences of sep.  The default separator is a
    single space.

    (joinfields and join are synonymous)

    (R(twordsR((s+/opt/alt/python27/lib64/python2.7/string.pyR6s
cGs
|j|�S(spindex(s, sub [,start [,end]]) -> int

    Like find but raises ValueError when the substring is not found.

    (tindex(R
RP((s+/opt/alt/python27/lib64/python2.7/string.pyR_DscGs
|j|�S(srrindex(s, sub [,start [,end]]) -> int

    Like rfind but raises ValueError when the substring is not found.

    (trindex(R
RP((s+/opt/alt/python27/lib64/python2.7/string.pyR`MscGs
|j|�S(s�count(s, sub[, start[,end]]) -> int

    Return the number of occurrences of substring sub in string
    s[start:end].  Optional arguments start and end are
    interpreted as in slice notation.

    (tcount(R
RP((s+/opt/alt/python27/lib64/python2.7/string.pyRaVscGs
|j|�S(sfind(s, sub [,start [,end]]) -> in

    Return the lowest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.

    Return -1 on failure.

    (tfind(R
RP((s+/opt/alt/python27/lib64/python2.7/string.pyRbas
cGs
|j|�S(srfind(s, sub [,start [,end]]) -> int

    Return the highest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.

    Return -1 on failure.

    (trfind(R
RP((s+/opt/alt/python27/lib64/python2.7/string.pyRcns
cCs
t|�S(sYatof(s) -> float

    Return the floating point number represented by the string s.

    (t_float(R
((s+/opt/alt/python27/lib64/python2.7/string.pytatof�si
cCs
t||�S(ssatoi(s [,base]) -> int

    Return the integer represented by the string s in the given
    base, which defaults to 10.  The string s must consist of one
    or more digits, possibly preceded by a sign.  If base is 0, it
    is chosen from the leading characters of s, 0 for octal, 0x or
    0X for hexadecimal.  If base is 16, a preceding 0x or 0X is
    accepted.

    (t_int(R
tbase((s+/opt/alt/python27/lib64/python2.7/string.pytatoi�scCs
t||�S(s�atol(s [,base]) -> long

    Return the long integer represented by the string s in the
    given base, which defaults to 10.  The string s must consist
    of one or more digits, possibly preceded by a sign.  If base
    is 0, it is chosen from the leading characters of s, 0 for
    octal, 0x or 0X for hexadecimal.  If base is 16, a preceding
    0x or 0X is accepted.  A trailing L or l is not accepted,
    unless base is 0.

    (t_long(R
Rg((s+/opt/alt/python27/lib64/python2.7/string.pytatol�scGs|j||�S(s�ljust(s, width[, fillchar]) -> string

    Return a left-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.  If specified the fillchar is used instead of spaces.

    (tljust(R
twidthRP((s+/opt/alt/python27/lib64/python2.7/string.pyRk�scGs|j||�S(s�rjust(s, width[, fillchar]) -> string

    Return a right-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.  If specified the fillchar is used instead of spaces.

    (trjust(R
RlRP((s+/opt/alt/python27/lib64/python2.7/string.pyRm�scGs|j||�S(s�center(s, width[, fillchar]) -> string

    Return a center version of s, in a field of the specified
    width. padded with spaces as needed.  The string is never
    truncated.  If specified the fillchar is used instead of spaces.

    (tcenter(R
RlRP((s+/opt/alt/python27/lib64/python2.7/string.pyRn�scCs+t|t�st|�}n|j|�S(s�zfill(x, width) -> string

    Pad a numeric string x with zeros on the left, to fill a field
    of the specified width.  The string x is never truncated.

    (t
isinstancet
basestringtreprtzfill(R
Rl((s+/opt/alt/python27/lib64/python2.7/string.pyRr�sicCs
|j|�S(s�expandtabs(s [,tabsize]) -> string

    Return a copy of the string s with all tab characters replaced
    by the appropriate number of spaces, depending on the current
    column, and the tabsize (default 8).

    (t
expandtabs(R
ttabsize((s+/opt/alt/python27/lib64/python2.7/string.pyRs�scCs;|s|dkr"|j||�S|j||d �SdS(sgtranslate(s,table [,deletions]) -> string

    Return a copy of the string s, where all characters occurring
    in the optional argument deletions are removed, and the
    remaining characters have been mapped through the given
    translation table, which must be a string of length 256.  The
    deletions argument is not allowed for Unicode strings.

    iN(RJt	translate(R
ttablet	deletions((s+/opt/alt/python27/lib64/python2.7/string.pyRu�s
cCs
|j�S(socapitalize(s) -> string

    Return a copy of the string s with only its first character
    capitalized.

    (R(R
((s+/opt/alt/python27/lib64/python2.7/string.pyR�scCs|j|||�S(s�replace (str, old, new[, maxreplace]) -> string

    Return a copy of string str with all occurrences of substring
    old replaced by new. If the optional argument maxreplace is
    given, only the first maxreplace occurrences are replaced.

    (treplace(R
toldtnewt
maxreplace((s+/opt/alt/python27/lib64/python2.7/string.pyRxs(Rt	lowercaset	uppercaset
whitespacet	FormattercBsYeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	cOs�|std��n|d|d}}y|d|d}}Wn;tk
r�d|krq|jd�}q�td��nX|j|||�S(Ns;descriptor 'format' of 'Formatter' object needs an argumentiit
format_strings@format() missing 1 required positional argument: 'format_string'(RNt
IndexErrortpoptvformat(RPtkwargsR R�((s+/opt/alt/python27/lib64/python2.7/string.pytformat"s
cCs;t�}|j||||d�}|j|||�|S(Ni(tsett_vformattcheck_unused_args(R R�RPR�t	used_argstresult((s+/opt/alt/python27/lib64/python2.7/string.pyR�1s	c
Cs�|dkrtd��ng}x�|j|�D]�\}}}	}
|rY|j|�n|dk	r1|j|||�\}}|j|�|j||
�}|j|	||||d�}	|j|j||	��q1q1Wdj	|�S(NisMax string recursion exceedediR(
RtparsetappendRJt	get_fieldtaddt
convert_fieldR�tformat_fieldR(
R R�RPR�R�trecursion_depthR�tliteral_textt
field_nametformat_spect
conversiontobjtarg_used((s+/opt/alt/python27/lib64/python2.7/string.pyR�7s
 cCs)t|ttf�r||S||SdS(N(Rotinttlong(R R%RPR�((s+/opt/alt/python27/lib64/python2.7/string.pyt	get_valueYscCsdS(N((R R�RPR�((s+/opt/alt/python27/lib64/python2.7/string.pyR�`scCs
t||�S(N(R�(R tvalueR�((s+/opt/alt/python27/lib64/python2.7/string.pyR�dscCsU|dkr|S|dkr&t|�S|dkr<t|�Stdj|���dS(NR
trs"Unknown conversion specifier {0!s}(RJtstrRqRR�(R R�R�((s+/opt/alt/python27/lib64/python2.7/string.pyR�hs

cCs
|j�S(N(t_formatter_parser(R R�((s+/opt/alt/python27/lib64/python2.7/string.pyR�zsc	Csj|j�\}}|j|||�}x6|D].\}}|rRt||�}q.||}q.W||fS(N(t_formatter_field_name_splitR�tgetattr(	R R�RPR�tfirsttrestR�tis_attrR((s+/opt/alt/python27/lib64/python2.7/string.pyR��s(R'R(R�R�R�R�R�R�R�R�R�(((s+/opt/alt/python27/lib64/python2.7/string.pyR!s			"						(((GR)R~R|R}tletterstascii_lowercasetascii_uppercaset
ascii_letterstdigitst	hexdigitst	octdigitstpunctuationt	printableRtchrtxrangetlR�RRRJRRRtreR/RttypeR*R:Rtindex_errort
atoi_errort
atof_errort
atol_errorRURVRWRXRZR[RtsplitfieldsR]t
joinfieldsR_R`RaRbRctfloatRdR�RfR�RiReRhRjRkRmRnRrRsRuRRxtstroptImportErrortobjectR(((s+/opt/alt/python27/lib64/python2.7/string.pyt<module>s|

	\					

						
	
	
			
	
	
"


Zerion Mini Shell 1.0