403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/reportlab/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/reportlab/lib/__pycache__/pygments2xpre.cpython-311.pyc
�

}G�b�	���dZdZddlZddlmZd�Zdd�Zd�Zed	kr=ddl	Z	e	j
d
d�Zesed��e	j
d��ee��dSdS)
a�Helps you output colourised code snippets in ReportLab documents.

Platypus has an 'XPreformatted' flowable for handling preformatted
text, with variations in fonts and colors.   If Pygments is installed,
calling 'pygments2xpre' will return content suitable for display in
an XPreformatted object.  If it's not installed, you won't get colours.

For a list of available lexers see http://pygments.org/docs/

)�
pygments2xpre�N)�StringIOc�l�|�dd��}|�dd��}|�dd��}|�dd��}|gd�zD]=\}}|�d|zd|z��}tjd	|zd|z|��}�>tjd
d|��}|S)z<Helper to transform Pygments HTML output to ReportLab markupz<div class="highlight">�z</div>z<pre>z</pre>))�p�#000000)�nr)�errrz<span class="%s">z<span color="%s">z<span class="%s\s+.*">z<span class=".*">z<span color="#0f0f0f">)�replace�re�sub)�s�styles�k�cs    �=/usr/lib/python3/dist-packages/reportlab/lib/pygments2xpre.py�_2xprers���	�	�	�+�B�/�/�A�	�	�	�(�2���A�	�	�	�'�"���A�	�	�	�(�2���A��I�I�I�I�K�K���!�
�I�I�)�A�-�.A�A�.E�F�F���F�,�a�/�0C�a�0G��J�J���
��#�$<�Q�?�?�A��H��pythonc�R�	ddlm}ddlm}n#t$r|cYSwxYwddlm}d�}t��}||��}|��}|||||��d�|j�	��D��}	|t|���|	����S)z(Return markup suitable for XPreformattedr)�	highlight)�
HtmlFormatter)�get_lexer_by_namec��|S)N�)�xs r�<lambda>zpygments2xpre.<locals>.<lambda>$s��a�rc���g|]j\}\}}}|�|�
|�d���"||�d��d�d��d���f��kS)zcolor:�;r�:�)�
startswith�split�strip)�.0�cls�style�ttype�levels     r�
<listcomp>z!pygments2xpre.<locals>.<listcomp>+s���A�A�A�.�C�.�%����A� �A�%*�%5�%5�h�%?�%?�A�s�E�K�K��$�$�Q�'�-�-�c�2�2�1�5�;�;�=�=�>�A�A�Ar)�pygmentsr�pygments.formattersr�ImportError�pygments.lexersrr�class2style�itemsr�getvalue)
r�languagerrr�rconv�out�l�hrs
          rrrs����&�&�&�&�&�&�5�5�5�5�5�5�5��������������2�1�1�1�1�1��K�E�
�*�*�C���(�#�#�A��
���A�
�I�a��!�C����A�A�23�-�2E�2E�2G�2G�A�A�A�F��5�������v�.�.�/�/�/s���c��ddlm}m}m}ddlm}|��d}|��d}|d��}gj}|D]_}	|||	|�����t|	d�����}
t|
��}||||������`|�
|j��td	��d
S)z,Helper function - makes minimal PDF documentr)�	Paragraph�SimpleDocTemplate�
XPreformatted)�getSampleStyleSheet�Title�Codezpygments2xpre.pdf)r'�rzsaved pygments2xpre.pdfN)
�reportlab.platypusr8r9r:�reportlab.lib.stylesr;�append�open�readr�build�__self__�print)�	filenamesr8r9r:r;�styT�styC�doc�S�filename�src�fmts            r�convertSourceFilesrO0s��O�N�N�N�N�N�N�N�N�N�8�8�8�8�8�8�	�	�	�	�w�	'�D�	�	�	�	�v�	&�D�
�
�/�
0�
0�C�
�	�A��*�*��	��)�)�H�4�
(�
(�
(�)�)�)��8�S�!�!�&�&�(�(���C� � ��	��-�-��4�
(�
(�
(�)�)�)�)��I�I�a�j����	�
#�$�$�$�$�$r�__main__r!z2usage:  pygments2xpre.py file1.py [file2.py] [...])r)�__doc__�__all__r�iorrrrO�__name__�sys�argvrGrF�exitrrr�<module>rXs���	�	���	�	�	�	�������

�

�

�0�0�0�0�*%�%�%�"�Z����J�J�J�������I���
��B�C�C�C����������y�!�!�!�!�!�
�r

Youez - 2016 - github.com/yon3zu
LinuXploit