ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python37/lib64/python3.7/xml/sax/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/xml/sax/__pycache__/saxutils.cpython-37.opt-2.pyc

B

0��c�/�@s�ddlZddlZddlZddlZddlZddlmZddlmZdd�Z	ifdd�Z
ifd	d
�Zifdd�Zd
d�Z
Gdd�dej�ZGdd�dej�Zddd�ZdS)�N�)�handler)�	xmlreadercCs&x |��D]\}}|�||�}q
W|S)N)�items�replace)�s�d�key�value�r�5/opt/alt/python37/lib64/python3.7/xml/sax/saxutils.py�__dict_replacesr
cCs6|�dd�}|�dd�}|�dd�}|r2t||�}|S)N�&z&amp;�>z&gt;�<z&lt;)rr
)�data�entitiesrrr�escapes	
rcCs2|�dd�}|�dd�}|r&t||�}|�dd�S)Nz&lt;rz&gt;rz&amp;r)rr
)rrrrr�unescape"s

rcCs\|��}|�dddd��t||�}d|krPd|krFd|�dd�}qXd	|}nd|}|S)
Nz&#10;z&#13;z&#9;)�
�
�	�"�'z"%s"z&quot;z'%s')�copy�updaterr)rrrrr�	quoteattr0s

rcs��dkrddl}|jSt�tj�r&�St�tjtjf�r<�St�tj�rlG�fdd�d�}|�}dd�|_	nDt�
�}dd�|_�j|_y�j
|_
�j|_Wntk
r�YnXtj||ddd	d
�S)NrcseZdZ�jZ�fdd�ZdS)z _gettextwriter.<locals>._wrappercs
t�|�S)N)�getattr)�self�name)�outrr�__getattr__[sz,_gettextwriter.<locals>._wrapper.__getattr__N)�__name__�
__module__�__qualname__�	__class__r!r)r rr�_wrapperYsr&cSsdS)Nrrrrr�<lambda>^�z _gettextwriter.<locals>.<lambda>cSsdS)NTrrrrrr'cr(�xmlcharrefreplacerT)�encoding�errors�newline�
write_through)�sys�stdout�
isinstance�io�
TextIOBase�codecs�StreamWriter�StreamReaderWriter�	RawIOBase�close�BufferedIOBase�writable�write�seekable�tell�AttributeError�
TextIOWrapper)r r*r.r&�bufferr)r r�_gettextwriterHs.
r@c@s�eZdZd dd�Zdd�Zd!dd	�Zd
d�Zdd
�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)"�XMLGeneratorN�
iso-8859-1FcCsVtj�|�t||�}|j|_|j|_ig|_|jd|_	g|_
||_||_d|_
dS)N���F)r�ContentHandler�__init__r@r:�_write�flush�_flush�_ns_contexts�_current_context�_undeclared_ns_maps�	_encoding�_short_empty_elements�_pending_start_element)rr r*Zshort_empty_elementsrrrrEss
zXMLGenerator.__init__cCsJ|drBd|dkr d|dS|j|d}|rB|d|dS|dS)Nrz$http://www.w3.org/XML/1998/namespacezxml:r�:)rJ)rr�prefixrrr�_qnameszXMLGenerator._qnamecCs|jr|�d�d|_dS)NrF)rNrF)r�
endElementrrr�_finish_pending_start_element�s
z*XMLGenerator._finish_pending_start_elementcCs|�d|j�dS)Nz$<?xml version="1.0" encoding="%s"?>
)rFrL)rrrr�
startDocument�szXMLGenerator.startDocumentcCs|��dS)N)rH)rrrr�endDocument�szXMLGenerator.endDocumentcCs0|j�|j���||j|<|j�||f�dS)N)rI�appendrJrrK)rrP�urirrr�startPrefixMapping�s
zXMLGenerator.startPrefixMappingcCs|jd|_|jd=dS)NrC)rIrJ)rrPrrr�endPrefixMapping�szXMLGenerator.endPrefixMappingcCs^|��|�d|�x*|��D]\}}|�d|t|�f�q W|jrPd|_n
|�d�dS)Nrz %s=%sTr)rSrFrrrMrN)rr�attrsr
rrr�startElement�szXMLGenerator.startElementcCs*|jr|�d�d|_n|�d|�dS)Nz/>Fz</%s>)rNrF)rrrrrrR�s
zXMLGenerator.endElementcCs�|��|�d|�|��x8|jD].\}}|rD|�d||f�q$|�d|�q$Wg|_x0|��D]$\}}|�d|�|�t|�f�qfW|jr�d|_n
|�d�dS)Nrz xmlns:%s="%s"z xmlns="%s"z %s=%sTr)rSrFrQrKrrrMrN)rr�qnamerZrPrWr
rrr�startElementNS�s zXMLGenerator.startElementNScCs0|jr|�d�d|_n|�d|�|��dS)Nz/>Fz</%s>)rNrFrQ)rrr\rrr�endElementNS�s
zXMLGenerator.endElementNScCs4|r0|��t|t�s"t||j�}|�t|��dS)N)rSr0�strrLrFr)r�contentrrr�
characters�s

zXMLGenerator.characterscCs0|r,|��t|t�s"t||j�}|�|�dS)N)rSr0r_rLrF)rr`rrr�ignorableWhitespace�s

z XMLGenerator.ignorableWhitespacecCs|��|�d||f�dS)Nz	<?%s %s?>)rSrF)r�targetrrrr�processingInstruction�sz"XMLGenerator.processingInstruction)NrBF)F)r"r#r$rErQrSrTrUrXrYr[rRr]r^rarbrdrrrrrAqs


rAc@s�eZdZd:dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�ZdS);�
XMLFilterBaseNcCstj�|�||_dS)N)r�	XMLReaderrE�_parent)r�parentrrrrE�szXMLFilterBase.__init__cCs|j�|�dS)N)�_err_handler�error)r�	exceptionrrrrj�szXMLFilterBase.errorcCs|j�|�dS)N)ri�
fatalError)rrkrrrrl�szXMLFilterBase.fatalErrorcCs|j�|�dS)N)ri�warning)rrkrrrrm�szXMLFilterBase.warningcCs|j�|�dS)N)�
_cont_handler�setDocumentLocator)rZlocatorrrrro�sz XMLFilterBase.setDocumentLocatorcCs|j��dS)N)rnrT)rrrrrTszXMLFilterBase.startDocumentcCs|j��dS)N)rnrU)rrrrrUszXMLFilterBase.endDocumentcCs|j�||�dS)N)rnrX)rrPrWrrrrXsz XMLFilterBase.startPrefixMappingcCs|j�|�dS)N)rnrY)rrPrrrrY	szXMLFilterBase.endPrefixMappingcCs|j�||�dS)N)rnr[)rrrZrrrr[szXMLFilterBase.startElementcCs|j�|�dS)N)rnrR)rrrrrrRszXMLFilterBase.endElementcCs|j�|||�dS)N)rnr])rrr\rZrrrr]szXMLFilterBase.startElementNScCs|j�||�dS)N)rnr^)rrr\rrrr^szXMLFilterBase.endElementNScCs|j�|�dS)N)rnra)rr`rrrraszXMLFilterBase.characterscCs|j�|�dS)N)rnrb)r�charsrrrrbsz!XMLFilterBase.ignorableWhitespacecCs|j�||�dS)N)rnrd)rrcrrrrrdsz#XMLFilterBase.processingInstructioncCs|j�|�dS)N)rn�
skippedEntity)rrrrrrq!szXMLFilterBase.skippedEntitycCs|j�|||�dS)N)�_dtd_handler�notationDecl)rr�publicId�systemIdrrrrs&szXMLFilterBase.notationDeclcCs|j�||||�dS)N)rr�unparsedEntityDecl)rrrtruZndatarrrrv)sz XMLFilterBase.unparsedEntityDeclcCs|j�||�S)N)Z_ent_handler�
resolveEntity)rrtrurrrrw.szXMLFilterBase.resolveEntitycCs@|j�|�|j�|�|j�|�|j�|�|j�|�dS)N)rgZsetContentHandlerZsetErrorHandlerZsetEntityResolverZ
setDTDHandler�parse)r�sourcerrrrx3s
zXMLFilterBase.parsecCs|j�|�dS)N)rg�	setLocale)r�localerrrrz:szXMLFilterBase.setLocalecCs|j�|�S)N)rg�
getFeature)rrrrrr|=szXMLFilterBase.getFeaturecCs|j�||�dS)N)rg�
setFeature)rr�staterrrr}@szXMLFilterBase.setFeaturecCs|j�|�S)N)rg�getProperty)rrrrrrCszXMLFilterBase.getPropertycCs|j�||�dS)N)rg�setProperty)rrr
rrrr�FszXMLFilterBase.setPropertycCs|jS)N)rg)rrrr�	getParentKszXMLFilterBase.getParentcCs
||_dS)N)rg)rrhrrr�	setParentNszXMLFilterBase.setParent)N)r"r#r$rErjrlrmrorTrUrXrYr[rRr]r^rarbrdrqrsrvrwrxrzr|r}rr�r�r�rrrrre�s8
re�cCst|t�rt�|�}n^t|d�rt|}t��}t|�d�t�rH|�|�n
|�|�t|d�rtt|jt�rt|�	|j�|�
�dk�r
|��dk�r
|��}t
j�t
j�|��}t
j�||�}t
j�|�r�|�	|�t|d�}n$|�	tj�||��tj�|���}|�|�|S)N�readrr�rb)r0r_rZInputSource�hasattrr�ZsetCharacterStreamZ
setByteStreamrZsetSystemIdZgetCharacterStreamZ
getByteStreamZgetSystemId�os�path�dirname�normpath�join�isfile�open�urllibrxZurljoinZrequestZurlopen)ry�base�fZsysidZbaseheadZ
sysidfilenamerrr�prepare_input_sourceSs*




r�)r�)r�Zurllib.parser�Zurllib.requestr1r3r�rrr
rrrr@rDrArfrer�rrrr�<module>s)so

Zerion Mini Shell 1.0