Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 216.73.216.27
Web Server : Apache/2.4.65 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/cwd/lib/python2.7/xml/sax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/cwd/lib/python2.7/xml/sax/saxutils.pyc
�
�,bc@s-dZddlZddlZddlZddlZddlZddlZddlZddlZyej	ej
gZWnek
r�ej	gZnXd�Z
id�Zid�Zid�Zd�Zdejfd	��YZd
ejfd��YZdejfd
��YZdd�ZdS(snA library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
i����NcCs3x,|j�D]\}}|j||�}q
W|S(s2Replace substrings of a string using a dictionary.(titemstreplace(tstdtkeytvalue((s&/usr/lib/python2.7/xml/sax/saxutils.pyt__dict_replacescCsR|jdd�}|jdd�}|jdd�}|rNt||�}n|S(s�Escape &, <, and > in a string of data.

    You can escape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    t&s&amp;t>s&gt;t<s&lt;(RR(tdatatentities((s&/usr/lib/python2.7/xml/sax/saxutils.pytescapes	cCsL|jdd�}|jdd�}|r<t||�}n|jdd�S(s
Unescape &amp;, &lt;, and &gt; in a string of data.

    You can unescape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    s&lt;R	s&gt;Rs&amp;R(RR(R
R((s&/usr/lib/python2.7/xml/sax/saxutils.pytunescape's
cCs�|j�}|jidd6dd6dd6�t||�}d|kr{d|krnd	|jdd
�}q�d|}n
d	|}|S(s�Escape and quote an attribute value.

    Escape &, <, and > in a string of data, then quote it for use as
    an attribute value.  The " character will be escaped as well, if
    necessary.

    You can escape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    s&#10;s
s&#13;s
s&#9;s	t"t's"%s"s&quot;s'%s'(tcopytupdateRR(R
R((s&/usr/lib/python2.7/xml/sax/saxutils.pyt	quoteattr5s"

cCs�|dkr$ddl}|j}nt|tj�rTtj|�}d�|_nTtj�}d�|_|j	|_	y|j
|_
|j|_Wntk
r�nXt
|d|dddd�S(	Ni����cSsdS(N(tNone(((s&/usr/lib/python2.7/xml/sax/saxutils.pyt<lambda>VscSstS(N(tTrue(((s&/usr/lib/python2.7/xml/sax/saxutils.pyR[stencodingterrorstxmlcharrefreplacetnewlines
(Rtsyststdoutt
isinstancetiot	RawIOBasetBufferedIOBasetclosetwritabletwritetseekablettelltAttributeErrort_UnbufferedTextIOWrapper(toutRRtbuffer((s&/usr/lib/python2.7/xml/sax/saxutils.pyt_gettextwriterMs"
R&cBseZd�ZRS(cCs$tt|�j|�|j�dS(N(tsuperR&R"tflush(tselfR((s&/usr/lib/python2.7/xml/sax/saxutils.pyR"ks(t__name__t
__module__R"(((s&/usr/lib/python2.7/xml/sax/saxutils.pyR&jstXMLGeneratorcBs�eZddd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(s
iso-8859-1cCsitjj|�t||�}|j|_|j|_ig|_|jd|_	g|_
||_dS(Ni����(thandlertContentHandlert__init__R)R"t_writeR+t_flusht_ns_contextst_current_contextt_undeclared_ns_mapst	_encoding(R,R'R((s&/usr/lib/python2.7/xml/sax/saxutils.pyR2rs	cCsX|drPd|dkr&d|dS|j|d}|rP|d|dSn|dS(s7Builds a qualified name from a (ns_url, localname) pairis$http://www.w3.org/XML/1998/namespacesxml:it:(R6(R,tnametprefix((s&/usr/lib/python2.7/xml/sax/saxutils.pyt_qname|s
cCs|jd|j�dS(Nu$<?xml version="1.0" encoding="%s"?>
(R3R8(R,((s&/usr/lib/python2.7/xml/sax/saxutils.pyt
startDocument�s	cCs|j�dS(N(R4(R,((s&/usr/lib/python2.7/xml/sax/saxutils.pytendDocument�scCs@|jj|jj��||j|<|jj||f�dS(N(R5tappendR6RR7(R,R;turi((s&/usr/lib/python2.7/xml/sax/saxutils.pytstartPrefixMapping�s
cCs|jd|_|jd=dS(Ni����(R5R6(R,R;((s&/usr/lib/python2.7/xml/sax/saxutils.pytendPrefixMapping�scCs\|jd|�x7|j�D])\}}|jd|t|�f�qW|jd�dS(Nu<u %s=%su>(R3RR(R,R:tattrsR((s&/usr/lib/python2.7/xml/sax/saxutils.pytstartElement�s!cCs|jd|�dS(Nu</%s>(R3(R,R:((s&/usr/lib/python2.7/xml/sax/saxutils.pyt
endElement�scCs�|jd|j|��xH|jD]=\}}|rP|jd||f�q$|jd|�q$Wg|_x@|j�D]2\}}|jd|j|�t|�f�q{W|jd�dS(Nu<u xmlns:%s="%s"u xmlns="%s"u %s=%su>(R3R<R7RR(R,R:tqnameRCR;R@R((s&/usr/lib/python2.7/xml/sax/saxutils.pytstartElementNS�s	*cCs|jd|j|��dS(Nu</%s>(R3R<(R,R:RF((s&/usr/lib/python2.7/xml/sax/saxutils.pytendElementNS�scCs;t|t�s$t||j�}n|jt|��dS(N(RtunicodeR8R3R(R,tcontent((s&/usr/lib/python2.7/xml/sax/saxutils.pyt
characters�scCs5t|t�s$t||j�}n|j|�dS(N(RRIR8R3(R,RJ((s&/usr/lib/python2.7/xml/sax/saxutils.pytignorableWhitespace�scCs|jd||f�dS(Nu	<?%s %s?>(R3(R,ttargetR
((s&/usr/lib/python2.7/xml/sax/saxutils.pytprocessingInstruction�sN(R-R.RR2R<R=R>RARBRDRERGRHRKRLRN(((s&/usr/lib/python2.7/xml/sax/saxutils.pyR/ps
											t
XMLFilterBasecBs
eZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(sYThis class is designed to sit between an XMLReader and the
    client application's event handlers.  By default, it does nothing
    but pass requests up to the reader and events on to the handlers
    unmodified, but subclasses can override specific methods to modify
    the event stream or the configuration requests as they pass
    through.cCstjj|�||_dS(N(t	xmlreadert	XMLReaderR2t_parent(R,tparent((s&/usr/lib/python2.7/xml/sax/saxutils.pyR2�scCs|jj|�dS(N(t_err_handlerterror(R,t	exception((s&/usr/lib/python2.7/xml/sax/saxutils.pyRU�scCs|jj|�dS(N(RTt
fatalError(R,RV((s&/usr/lib/python2.7/xml/sax/saxutils.pyRW�scCs|jj|�dS(N(RTtwarning(R,RV((s&/usr/lib/python2.7/xml/sax/saxutils.pyRX�scCs|jj|�dS(N(t
_cont_handlertsetDocumentLocator(R,tlocator((s&/usr/lib/python2.7/xml/sax/saxutils.pyRZ�scCs|jj�dS(N(RYR=(R,((s&/usr/lib/python2.7/xml/sax/saxutils.pyR=�scCs|jj�dS(N(RYR>(R,((s&/usr/lib/python2.7/xml/sax/saxutils.pyR>�scCs|jj||�dS(N(RYRA(R,R;R@((s&/usr/lib/python2.7/xml/sax/saxutils.pyRA�scCs|jj|�dS(N(RYRB(R,R;((s&/usr/lib/python2.7/xml/sax/saxutils.pyRB�scCs|jj||�dS(N(RYRD(R,R:RC((s&/usr/lib/python2.7/xml/sax/saxutils.pyRD�scCs|jj|�dS(N(RYRE(R,R:((s&/usr/lib/python2.7/xml/sax/saxutils.pyRE�scCs|jj|||�dS(N(RYRG(R,R:RFRC((s&/usr/lib/python2.7/xml/sax/saxutils.pyRG�scCs|jj||�dS(N(RYRH(R,R:RF((s&/usr/lib/python2.7/xml/sax/saxutils.pyRH�scCs|jj|�dS(N(RYRK(R,RJ((s&/usr/lib/python2.7/xml/sax/saxutils.pyRK�scCs|jj|�dS(N(RYRL(R,tchars((s&/usr/lib/python2.7/xml/sax/saxutils.pyRL�scCs|jj||�dS(N(RYRN(R,RMR
((s&/usr/lib/python2.7/xml/sax/saxutils.pyRNscCs|jj|�dS(N(RYt
skippedEntity(R,R:((s&/usr/lib/python2.7/xml/sax/saxutils.pyR]scCs|jj|||�dS(N(t_dtd_handlertnotationDecl(R,R:tpublicIdtsystemId((s&/usr/lib/python2.7/xml/sax/saxutils.pyR_	scCs|jj||||�dS(N(R^tunparsedEntityDecl(R,R:R`Ratndata((s&/usr/lib/python2.7/xml/sax/saxutils.pyRbscCs|jj||�S(N(t_ent_handlert
resolveEntity(R,R`Ra((s&/usr/lib/python2.7/xml/sax/saxutils.pyRescCsT|jj|�|jj|�|jj|�|jj|�|jj|�dS(N(RRtsetContentHandlertsetErrorHandlertsetEntityResolvert
setDTDHandlertparse(R,tsource((s&/usr/lib/python2.7/xml/sax/saxutils.pyRjs
cCs|jj|�dS(N(RRt	setLocale(R,tlocale((s&/usr/lib/python2.7/xml/sax/saxutils.pyRlscCs|jj|�S(N(RRt
getFeature(R,R:((s&/usr/lib/python2.7/xml/sax/saxutils.pyRn scCs|jj||�dS(N(RRt
setFeature(R,R:tstate((s&/usr/lib/python2.7/xml/sax/saxutils.pyRo#scCs|jj|�S(N(RRtgetProperty(R,R:((s&/usr/lib/python2.7/xml/sax/saxutils.pyRq&scCs|jj||�dS(N(RRtsetProperty(R,R:R((s&/usr/lib/python2.7/xml/sax/saxutils.pyRr)scCs|jS(N(RR(R,((s&/usr/lib/python2.7/xml/sax/saxutils.pyt	getParent.scCs
||_dS(N(RR(R,RS((s&/usr/lib/python2.7/xml/sax/saxutils.pyt	setParent1sN( R-R.t__doc__RR2RURWRXRZR=R>RARBRDRERGRHRKRLRNR]R_RbReRjRlRnRoRqRrRsRt(((s&/usr/lib/python2.7/xml/sax/saxutils.pyRO�s:																										tcCst|�tkr$tj|�}nSt|d�rw|}tj�}|j|�t|d�rw|j|j�qwn|j�dkry|j
�}tjj
tjj|��}tj�}t|t�rt|t�sdy|j|�}Wqtk
r|j|�}qXqdnHt|t�rdy|j|�}Wqdtk
r`|j|�}qdXntjj||�}tjj|�}Wntk
r�t}nX|r�|j|�t|d�}n4|jtj||j
���tj|j
��}|j|�n|S(s�This function takes an InputSource and an optional base URL and
    returns a fully resolved InputSource object ready for reading.treadR:trbN(ttypet_StringTypesRPtInputSourcethasattrt
setByteStreamtsetSystemIdR:t
getByteStreamRtgetSystemIdtostpathtdirnametnormpathRtgetfilesystemencodingRRItdecodetUnicodeDecodeErrortencodetjointisfiletUnicodeErrortFalsetopenturlparseturljointurllibturlopen(RktbasetftsysidtbaseheadRt
sysidfilenameR�((s&/usr/lib/python2.7/xml/sax/saxutils.pytprepare_input_source6sF





(RuR�R�R�ttypesRRR0RPt
StringTypetUnicodeTypeRzR%RRR
RR)t
TextIOWrapperR&R1R/RQROR�(((s&/usr/lib/python2.7/xml/sax/saxutils.pyt<module>s$0
		Wo

Anon7 - 2022
AnonSec Team