HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //lib64/python2.7/site-packages/setroubleshoot/html_util.pyo
�
�3�Zc@s�ddddgZddlZddlZddlZddlZddlTdejfd��YZd	ej	fd
��YZ
d�Zd�Zd
d�Z
d�ZdS(tescape_htmlt
unescape_htmlthtml_to_textt
html_documenti����N(t*t
TextWritercBs>eZdddd�Zd�Zd�Zd�Zd�ZRS(iPicCs6tjj|||�d|_||_|j�dS(Ni(t	Formattert
DumbWritert__init__tindent_leveltindent_widtht_set_indent(tselftfiletmaxcolR
((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR&s		cCs'|j|j|_d|j|_dS(Nt (R	R
t
indent_coltindent(R((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR,scCs||_|j�dS(N(R	R(Rtmargintlevel((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyt
new_margin0s	cCs[|d}t|�|jkr/|j|�n(|jt|�}|jd||�dS(NR(tlenRtsend_literal_data(Rtdatatoffset((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pytsend_label_data4s

cCs|s
dS|jp#|dtjk}|j}|j}|jj}|j}|dkrr||j�|j}nx�|j	�D]v}|r�|t
|�|kr�|d|j�|j}q�|d�|d}n||�|t
|�}d}qW||_|dtjk|_dS(Nis
Rii����(tatbreaktstringt
whitespacetcolRR
twriteRRtsplitR(RRRRRRtword((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pytsend_flowing_data<s,			




	N(t__name__t
__module__tNoneRRRRR!(((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR%s
			tHTMLParserAnchorcBs&eZdd�Zd�Zd�ZRS(icCstjj|||�dS(N(thtmllibt
HTMLParserR(Rt	formattertverbose((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyRVscCs
||_dS(N(tanchor(Rthreftnamettype((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyt
anchor_bgnYscCs-|jr)|jd|j�d|_ndS(Ns (%s) (R*thandle_dataR$(R((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyt
anchor_end\s	(R"R#RR.R0(((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR%Ts	cCs||dkrdSy^|jdd�}|jdd�}|jdd�}|jdd�}|jd	d
�}WnnX|S(Nt&s&amp;t<s&lt;t>s&gt;t's&apos;t"s&quot;(R$treplace(ts((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyRcscCs~|dkrdSd|kr |S|jdd�}|jdd�}|jdd�}|jdd	�}|jd
d�}|S(NR1s&lt;R2s&gt;R3s&apos;R4s&quot;R5s&amp;(R$R6(R7((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyRpsiPcCs�yqddl}|j�}tjt||��}t|�}|j|�|j�|j�}|j�|SWn+tk
r�}t	j	t	j
d|�dSXdS(Ni����scannot convert html to text: %s(tStringIORtAbstractFormatterRR%tfeedtclosetgetvaluet	ExceptiontsyslogtLOG_ERRR$(thtmlRR8tbufferR(tparserttextte((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR{s


cGs�d}d}|}x�|D]�}t|�tkr>||7}qt|�ttgkrtx}|D]}||7}q]Wqt|�r�|�}t|�ttgkr�x%|D]}||7}q�Wq�||7}q||7}qW||7}|S(s&Wrap the body components in a HTML document structure with a valid header.
    Accepts a variable number of arguments of of which canb be:
    * string
    * a sequences of strings (tuple or list).
    * a callable object taking no parameters and returning a string or sequence of strings.
    sl<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  </head>
  <body>
s
  </body>
</html>(R-tStringTypest	TupleTypetListTypetcallable(tbody_componentstheadttailtdoctbody_componenttitemtresult((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyR�s$


	


(t__all__R>R&R(RRttypesRRR'R%RRRR(((s>/usr/lib64/python2.7/site-packages/setroubleshoot/html_util.pyt<module>s	
/