Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/future/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/future/utils/surrogateescape.pyo
�
,�]c@s�dZddlZddlZddlmZdZd�Zd�Zejrae	Z
d�ZneZ
e	Zd�Z
d	efd
��YZd�Zd�Zd
�Zd�ZdZed�Zed�Zeje�jZd�Zedkr�ndS(s�
This is Victor Stinner's pure-Python implementation of PEP 383: the "surrogateescape" error
handler of Python 3.

Source: misc/python/surrogateescape.py in https://bitbucket.org/haypo/misc
i����N(tutilstsurrogateescapecCstjr
|S|jd�SdS(Ntunicode_escape(RtPY3tdecode(ttext((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytus	cCstjr|jd�S|SdS(Ntlatin1(RRtencode(tdata((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytbs	
cCs
t|f�S(N(tbytes(tcode((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pyt<lambda>#scCs�|j|j|j!}yFt|t�r7t|�}n$t|t�rUt|�}n|�Wntk
ru|�nX||jfS(s�
    Pure Python implementation of the PEP 383: the "surrogateescape" error
    handler of Python 3. Undecodable bytes will be replaced by a Unicode
    character U+DCxx on decoding, and these are translated into the
    original bytes on encoding.
    (	tobjecttstarttendt
isinstancetUnicodeDecodeErrortreplace_surrogate_decodetUnicodeEncodeErrortreplace_surrogate_encodetNotASurrogateError(texctmystringtdecoded((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytsurrogateescape_handler(s


RcBseZRS((t__name__t
__module__(((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pyRCscCs�g}x�|D]�}t|�}d|ko6dknsDt�nd|ko[dknrz|jt|d��q
|dkr�|jt|d��q
t�q
Wt�j|�S(s�
    Returns a (unicode) string, not the more logical bytes, because the codecs
    register_error functionality expects this.
    i�i��i�i�(tordRtappendt_unichrtstrtjoin(RRtchR((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pyRGs
	
cCs�g}x�|D]�}t|t�r+|}nt|�}d|koNdknrm|jtd|��q
|dkr�|jt|��q
t�q
Wt�j|�S(s$
    Returns a (unicode) string
    i�i�i�i(RtintRRRRR R!(tmybytesRR"R((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pyRds
	
c	Cs�tdkr�g}x�t|�D]�\}}t|�}|dkrRt|�}nKd|koidknr�t|d�}ntt|||dd��|j|�qWt�j|�Stdkr�g}x�t|�D]�\}}t|�}d	|kod
knrld|ko(dknrMt|d�}|j|�q�tt|||dd��q�|jd�}|j|�q�Wt�j|�S|jtt	�SdS(Ntasciii�i��i��i�isordinal not in range(128)sutf-8i�i��ssurrogates not allowed(
tFS_ENCODINGt	enumerateRt	bytes_chrRRRR!Rt	FS_ERRORS(tfntencodedtindexR"Rtch_utf8((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytencodefilename}s8
	cCs|jtt�S(N(RR&R)(R*((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytdecodefilename�sR%s[abc�]s[abc\udcff]cCsFtjr
dSytjt�Wn!tk
rAtjtt�nXdS(sH
    Registers the surrogateescape error handler on Python 2 (only)
    N(RRtcodecstlookup_errorR)tLookupErrortregister_errorR(((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pytregister_surrogateescape�s	
t__main__(t__doc__R0tsystfutureRR)RR
RtchrRR(tunichrRt	ExceptionRRRR.R/R&R*R+tlookuptnameR4R(((s@/usr/lib/python2.7/site-packages/future/utils/surrogateescape.pyt<module>s0							'		

Spamworldpro Mini