403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/docutils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/docutils/__pycache__/io.cpython-311.pyc
�

/��bS����dZdZddlZddlZddlZddlZddlZddlZddlm	Z		ej
��dpej��dZe�
��Zn$#e$rZdejvrdZndZYdZ[ndZ[wdZYnxYw	eje��n#eef$rdZYnwxYwGd�d	e��ZGd
�de��Zd�Zd
�ZGd�de	��ZGd�de	��ZGd�d��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��Z Gd�de��Z!Gd �d!e��Z"Gd"�d#e��Z#dS)$z
I/O classes provide a uniform API for low-level input and output.  Subclasses
exist for a variety of input/output mechanisms.
�reStructuredText�N)�
TransformSpec�zunknown locale: UTF-8�utf-8c��eZdZdS)�
InputErrorN��__name__�
__module__�__qualname__���-/usr/lib/python3/dist-packages/docutils/io.pyrr0��������rrc��eZdZdS)�OutputErrorNr	r
rrrr1rrrc��	tj|j��tj|��kS#ttt
f$rYdSwxYw)aNTest, whether the encoding of `stream` matches `encoding`.

    Returns

    :None:  if `encoding` or `stream.encoding` are not a valid encoding
            argument (e.g. ``None``) or `stream.encoding is missing.
    :True:  if the encoding argument resolves to the same value as `encoding`,
    :False: if the encodings differ.
    N)�codecs�lookup�encoding�LookupError�AttributeError�	TypeError)�streamrs  r�check_encodingr4sQ����}�V�_�-�-���x�1H�1H�H�H�����3�����t�t����s�.1�A�Ac�$�|jj�d|��S)z5Return string representation of Exception `err`.
    z: )�	__class__r
)�errs r�error_stringrDs���m�$�-�-��-�-�-rc��eZdZdZdZdZ		dd�Zd�Zd�Zd�Z	e
jd	��Z	e
jd
fe
jdfe
jdffZ	d
�Zd�ZdS)�Inputz1
    Abstract base class for input wrappers.
    �inputN�strictc�p�||_	||_	||_	||_	|s|j|_d|_dS�N)r�
error_handler�source�source_path�default_source_path�successful_encoding)�selfr'r(rr&s     r�__init__zInput.__init__TsM�� ��
�1�*���*����'�&���-��	8�#�7�D��#'�� �E�Erc�4�|j�d|j�d|j��S)Nz	: source=z, source_path=)rr'r(�r+s r�__repr__zInput.__repr__hs(��26�.�.�.�$�+�+�+�26�2B�2B�D�	Drc��t�r%��NotImplementedErrorr.s r�readz
Input.readls��!�!rc���|jr<|j���dkrt|t��s
Jd���t|t��r|S|jr	|jg}n_|�|��}|r|g}nDdg}t
r%t
dkr|�t
��|�d��|D]W}	t|||j��}||_|�	dd��cS#ttf$r}|}Yd}~�Pd}~wwxYwtdd	�d
�|D�����dt|���d����)
a�
        Decode `data` if required.

        Return Unicode `str` instances unchanged (nothing to decode).

        If `self.encoding` is None, determine encoding from data
        or try UTF-8, locale encoding, and (as last ressort) 'latin-1'.
        The client application should call ``locale.setlocale`` at the
        beginning of processing::

            locale.setlocale(locale.LC_ALL, '')

        Raise UnicodeError if unsuccessful.
        �unicodez;input encoding is "unicode" but input is not a `str` objectrzlatin-1u�Nz=Unable to decode input data.  Tried the following encodings: z, c3�4K�|]}t|��V��dSr%)�repr)�.0�encs  r�	<genexpr>zInput.decode.<locals>.<genexpr>�s(����B�B�s��c���B�B�B�B�B�Br�.
(�))r�lower�
isinstance�str�determine_encoding_from_data�_locale_encoding�appendr&r*�replace�UnicodeErrorr�joinr)r+�data�encoding_candidates�
data_encodingr:�decodedr�errors        r�decodezInput.decodeos����=�	N�T�]�0�0�2�2�i�?�?��d�C�(�(�
N�
N�,M�
N�
N�
N��d�C� � �	��K��=�	6�$(�=�/��� �=�=�d�C�C�M��
6�(5�o�#�#�
(/�i�#�$�A�(8�G�(C�(C�'�.�.�/?�@�@�@�#�*�*�9�5�5�5�&�		�		�C�
��d�C��);�<�<��+.��(����x��4�4�4�4�4�� �+�.�
�
�
������������
�����
'��y�y�B�B�.A�B�B�B�B�B�
'�
'��U�#�#�
'�
'�
'�(�(�	(s�2D�D!�D�D!scoding[:=]\s*([-\w.]+)rz	utf-16-bez	utf-16-lec��|jD]\}}|�|��r|cS�|���dd�D]H}|j�|��}|r*|�d���d��cS�IdS)z�
        Try to determine the encoding of `data` by looking *in* `data`.
        Check for a byte order mark (BOM) or an encoding declaration.
        N�r�ascii)�byte_order_marks�
startswith�
splitlines�coding_slug�search�grouprL)r+rG�start_bytesr�line�matchs      rrAz"Input.determine_encoding_from_data�s���&*�%:�	 �	 �!�K�����{�+�+�
 �����
 ��O�O�%�%�b�q�b�)�	6�	6�D��$�+�+�D�1�1�E��
6��{�{�1�~�~�,�,�W�5�5�5�5�5�
6��trc�X�	|j���S#t$rYdSwxYw�NF)r'�isattyrr.s rr[zInput.isatty�s=��	��;�%�%�'�'�'���	�	�	��5�5�	������
)�)�NNNr#)r
rr�__doc__�component_typer)r,r/r3rL�re�compilerSr�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LErPrAr[r
rrr!r!Js����������N���?C�'�F�F�F�F�(D�D�D�"�"�"�8(�8(�8(�t�"�*�7�8�8�K�'���'�2��,�k�:��,�k�:�=��-���� ����rr!c�8�eZdZdZdZdZ		d	d�Zd�Zd�Zd�Z	dS)
�Outputz2
    Abstract base class for output wrappers.
    �outputNr#c�j�||_	|pd|_	||_	||_	|s|j|_dSdS)Nr#)rr&�destination�destination_path�default_destination_path)r+rirjrr&s     rr,zOutput.__init__�sX�� ��
�7�*�6�h���*�&���.� 0���2��	B�$(�$A�D�!�!�!�	B�	Brc�4�|j�d|j�d|j��S)Nz: destination=z, destination_path=)rrirjr.s rr/zOutput.__repr__�s*���>�>�>�4�#3�#3�#3�T�5J�5J�L�	Mrc��t�)z;`data` is a Unicode string, to be encoded by `self.encode`.r1�r+rGs  r�writezOutput.write�s��!�!rc��|jr>|j���dkr!t|t��s
Jd���|St|t��s|S|�|j|j��S)Nr5zFthe encoding given is "unicode" but the output is not a Unicode string)rr>r?r@�encoder&rns  rrqz
Output.encode�s����=�	�T�]�0�0�2�2�i�?�?��d�C�(�(�
$�
$�#�
$�
$�
$��K��$��$�$�	B��K��;�;�t�}�d�.@�A�A�Arr])
r
rrr^r_rkr,r/rorqr
rrrfrf�s~���������N�#��:>�.6�B�B�B�B�"M�M�M�"�"�"�
B�
B�
B�
B�
Brrfc�2�eZdZdZ			d	d�Zd�Zd�Zd�ZdS)
�ErrorOutputz�
    Wrapper class for file-like error streams with
    failsafe de- and encoding of `str`, `bytes`, `unicode` and
    `Exception` instances.
    N�backslashreplacerDc���|�
tj}n*|sd}n%t|t��rt	|d��}||_	|pt
|dd��ptpd|_	||_		||_
dS)a�
        :Parameters:
            - `destination`: a file-like object,
                        a string (path to a file),
                        `None` (write to `sys.stderr`, default), or
                        evaluating to `False` (write() requests are ignored).
            - `encoding`: `destination` text encoding. Guessed if None.
            - `encoding_errors`: how to treat encoding errors.
        NF�wrrO)�sys�stderrr?r@�openri�getattrrBr�encoding_errors�decoding_errors)r+rirr{r|s     rr,zErrorOutput.__init__s������*�K�K��	1��K�K�
��S�
)�
)�	1��{�C�0�0�K�&���+�!�8�W�[�*�d�%K�%K�8�,�8�07�	
�
�,�.���%�.���%�%rc���|jsdSt|t��rt|��}	|j�|��dS#t
$r<|j�|�|j|j����YdSt$r�t|t��r;|j�|�|j|j����YdS|jtjtjfvr"|jj
�|��YdS|j�t||j|j����YdSwxYw)z�
        Write `data` to self.destination. Ignore, if self.destination is False.

        `data` can be a `bytes`, `str`, or `Exception` instance.
        N)rir?�	Exceptionr@ro�UnicodeEncodeErrorrqrr{rrwrx�stdout�bufferr|rns  rrozErrorOutput.write"s�����	��F��d�I�&�&�	��t�9�9�D�	B���"�"�4�(�(�(�(�(��!�	F�	F�	F���"�"�4�;�;�t�}�/3�/C�$E�$E�
F�
F�
F�
F�
F�
F��		B�		B�		B��$��$�$�
B�� �&�&�t�{�{�4�=�37�3G�(I�(I�J�J�J�J�J�J��!�c�j�#�*�%=�=�=�� �'�-�-�d�3�3�3�3�3�3�� �&�&�s�4���+/�+?�(A�(A�B�B�B�B�B�B�		B���s%�A�AE!�AE!�)>E!�*3E!� E!c��|jtjtjfvrdS	|j���dS#t
$rYdSwxYw)z�
        Close the error-output stream.

        Ignored if the destination is` sys.stderr` or `sys.stdout` or has no
        close() method.
        N)rirwr�rx�closerr.s rr�zErrorOutput.close<sb�����
�C�J�7�7�7��F�	���"�"�$�$�$�$�$���	�	�	��D�D�	���s�>�
A�Ac�X�	|j���S#t$rYdSwxYwrZ)rir[rr.s rr[zErrorOutput.isattyJs>��	��#�*�*�,�,�,���	�	�	��5�5�	���r\)NNrtrD)r
rrr^r,ror�r[r
rrrsrs�sn��������37�!3�!*�&�&�&�&�BB�B�B�4�������rrsc�2�eZdZdZ			d
d�Zd�Zd�Zd	�ZdS)�	FileInputz5
    Input for single, simple file-like objects.
    Nr#T�rc��t�|||||��||_t��|_|�g|rS	t|||jpd|j���|_n�#t$r }t|j|j|���d}~wwxYwtj|_nAt|j|j��dur%t!d|j�d|jj�d����|s%	|jj|_dS#t&$rYdSwxYwdS)a�
        :Parameters:
            - `source`: either a file-like object (which is read directly), or
              `None` (which implies `sys.stdin` if no `source_path` given).
            - `source_path`: a path to a file, which is opened and then read.
            - `encoding`: the expected text encoding of the input file.
            - `error_handler`: the encoding error handler to use.
            - `autoclose`: close automatically after read (except when
              `sys.stdin` is the source).
            - `mode`: how the file is to be opened (see standard function
              `open`). The default is read only ('r').
        Nz	utf-8-sig�r�errorsFz#Encoding clash: encoding given is "z&" but source is opened with encoding "z".)r!r,�	autoclosers�_stderrryrr&r'�OSErrorr�errno�strerrorrw�stdinrrE�namer(r)r+r'r(rr&r��moderKs        rr,zFileInput.__init__VsT��	���t�V�[�(�M�J�J�J�"���"�}�}����>��
(�O�"&�{�D�04�
�0L��.2�.@�#B�#B�#B�D�K�K���O�O�O�$�U�[�%�.�+�N�N�N�����O����"�i����
�D�K���
7�
7�5�
@�
@��,� $�
�
�
�t�{�/C�/C�/C� E�F�F�
F��	�
�#'�;�#3�� � � ��!�
�
�
����
����	�	s)�$A#�#
B
�-B�B
�&C9�9
D�Dc�^�	|jtjur|jj���}n|j���}nd#t
tf$rP|jsE|jr>t|jd��}|���}|�
��n�YnwxYw|jr|�
��n!#|jr|�
��wwxYw|�|��}d�
|���dgz��S)zU
        Read and decode a single file and return the data (Unicode string).
        �rb�
r6)r'rwr�r�r3rErrr(ryr�r�rLrFrR)r+rG�b_sources   rr3zFileInput.read~s%��	��{�c�i�'�'��{�)�.�.�0�0����{�'�'�)�)�����k�*�	�	�	��=�
�T�%5�
��� 0�$�7�7���}�}������� � � � ��!� �	�����~�
��
�
�������~�
��
�
�����
�����{�{�4� � ���y�y����*�*�B�4�/�0�0�0s+�AA�
C�AB/�,C�.B/�/C�C,c�P�|����d��S)zK
        Return lines of a single file as list of Unicode strings.
        T)r3rRr.s r�	readlineszFileInput.readlines�s ���y�y�{�{�%�%�d�+�+�+rc�b�|jtjur|j���dSdSr%)r'rwr�r�r.s rr�zFileInput.close�s3���;�c�i�'�'��K��������(�'r)NNNr#Tr�)r
rrr^r,r3r�r�r
rrr�r�Qsk��������15�.6�&)�&�&�&�&�P1�1�1�2,�,�,� � � � � rr�c�8�eZdZdZdZ				d
d�Zd�Zd�Zd	�ZdS)�
FileOutputz6
    Output for single, simple file-like objects.
    rvNr#Tc��t�|||||��d|_||_|�t	jdtd���|�||_t��|_	|�|rd|_n`tj|_nN|rLt|jd��r7||jjkr'td|jj�d	|�d
�|j	���|s%	|jj|_dS#t"$rYdSwxYwdS)aA
        :Parameters:
            - `destination`: either a file-like object (which is written
              directly) or `None` (which implies `sys.stdout` if no
              `destination_path` given).
            - `destination_path`: a path to a file, which is opened and then
              written.
            - `encoding`: the text encoding of the output file.
            - `error_handler`: the encoding error handler to use.
            - `autoclose`: close automatically after write (except when
              `sys.stdout` or `sys.stderr` is the destination).
            - `handle_io_errors`: ignored, deprecated, will be removed.
            - `mode`: how the file is to be opened (see standard function
              `open`). The default is 'w', providing universal newline
              support for text files.
        TNz_io.FileOutput: init argument "handle_io_errors" is ignored and will be removed in Docutils 2.0.rN)�
stacklevelFr�zWarning: Destination mode "z" differs from specified mode "�")�file)rfr,�openedr��warnings�warn�DeprecationWarningr�rsr�rwr�ri�hasattr�printr�rjr)r+rirjrr&r��handle_io_errorsr�s        rr,zFileOutput.__init__�sT��&	����k�+;� �-�	1�	1�	1����"����'��M�*�+=�!�
M�
M�
M�
M����D�I�"�}�}������
.�#����#&�:�� � ��	%��t�/��8�8�	%��$�*�/�/�/��E�!%�!1�!6�!6�!6����>��|�
%�
%�
%�
%� �	�
�(,�(8�(=��%�%�%��!�
�
�
����
����	�	s�C)�)
C7�6C7c���d|jvr|j|jd�}ni}	t|j|jfi|��|_n2#t$r%}t|j|j	|j���d}~wwxYwd|_
dS)N�br�T)r�rr&ryrjrir�rr�r�r�)r+�kwargsrKs   rryzFileOutput.open�s����d�i���"&�-� $� 2�4�4�F�F��F�	5�#�D�$9�4�9�O�O��O�O�D�����	5�	5�	5��e�k�5�>�"�3�5�5�
5�����	5��������s�;�
A*� A%�%A*c��|js|���d|jvrot|j|j��durS|�|��}tjdkr.|�	dttjd����}	|j�|��n�#t$r�}t|t��r|	|jj�|��n[#t$rNt|j|j��dur/t!d|jpd�d|jj�d	|j�d
����|�wxYwYd}~nDd}~wt$t&f$r-}t%d|j�d
t)|���d
����d}~wwxYw|jr|���n!#|jr|���wwxYw|S)z�Encode `data`, write it to a single file, and return it.

        With Python 3 or binary output mode, `data` is returned unchanged,
        except when specified encoding and output encoding differ.
        r�Fr��
rOzEncoding of riz (z&) differs 
  from specified encoding (r=Nz2Unable to encode output data. output-encoding is: r<)r�ryr�rrirrq�os�lineseprD�bytesrorr?r�r�
ValueErrorrjrErrr�r�)r+rGrs   rrozFileOutput.write�s���{�	��I�I�K�K�K��t�y� � ��t�/���?�?�5�H�H��;�;�t�$�$�D��z�T�!�!��|�|�E�5���W�+E�+E�F�F��	���"�"�4�(�(�(�(���	"�	"�	"��$��&�&�

"�"��$�+�1�1�$�7�7�7�7��%�
"�
"�
"�%�d�&6�&*�m�5�5�8=�>�>�(�j�"�2�C�m�C�C�!�-�6�6�6�!�]�]�]�	,�-�-�-�"�	�
"��������������k�*�	B�	B�	B��,�#�}�}�}�l�3�.?�.?�.?�.?�A�B�B�
B�����	B����
�~�
��
�
�������~�
��
�
�����
�����sU�B0�/F0�0
F�:E�C0�/E�0AE�E�F0�F�$(F�F�F0�0Gc��|jtjtjfvr"|j���d|_dSdSrZ)rirwr�rxr�r�r.s rr�zFileOutput.closesA����C�J��
�#;�;�;���"�"�$�$�$��D�K�K�K�<�;r)NNNr#TNN)	r
rrr^r�r,ryror�r
rrr�r��sv���������D�)�
;?�BF�-1�-�-�-�-�^���&�&�&�P � � � � rr�c��eZdZdZdZdS)�BinaryFileOutputzL
    A version of docutils.io.FileOutput which writes to a binary file.
    �wbN)r
rrr^r�r
rrr�r�s��������
�D�D�Drr�c��eZdZdZdZd�ZdS)�StringInputz
    Direct string input.
    �<string>c�6�|�|j��S)z$Decode and return the source string.)rLr'r.s rr3zStringInput.read*s���{�{�4�;�'�'�'rN�r
rrr^r)r3r
rrr�r�"s5��������%��(�(�(�(�(rr�c��eZdZdZdZd�ZdS)�StringOutputz
    Direct string output.
    r�c�D�|�|��|_|jS)z=Encode `data`, store it in `self.destination`, and return it.)rqrirns  rrozStringOutput.write7s���;�;�t�,�,�����rN�r
rrr^rkror
rrr�r�/s5�������� *�� � � � � rr�c��eZdZdZdZd�ZdS)�	NullInputz)
    Degenerate input: read nothing.
    z
null inputc��dS)zReturn a null string.r6r
r.s rr3zNullInput.readEs���rrNr�r
rrr�r�=s5��������'������rr�c��eZdZdZdZd�ZdS)�
NullOutputz+
    Degenerate output: write nothing.
    znull outputc��dS)z6Do nothing ([don't even] send data to the bit bucket).Nr
rns  rrozNullOutput.writeRs���rNr�r
rrr�r�Js5�������� -��
�
�
�
�
rr�c��eZdZdZdZd�ZdS)�DocTreeInputzm
    Adapter for document tree input.

    The document tree must be passed in the ``source`` parameter.
    z
doctree inputc��|jS)zReturn the document tree.)r'r.s rr3zDocTreeInput.readas
���{�rNr�r
rrr�r�Ws5��������*������rr�)$r^�
__docformat__r�localer�r`rwr��docutilsr�	getlocale�getdefaultlocalerBr>r�rK�argsrrrr�rrrrr!rfrsr�r�r�r�r�r�r�r�r
rr�<module>r�s���
��
#�
�
�
�
�
�
�
�
�
�	�	�	�	�	�	�	�	�
�
�
�
�����"�"�"�"�"�"�
�'�v�'�)�)�!�,�L�0G��0G�0I�0I�!�0L��'�-�-�/�/����� � � ��%�*�,�,�"������������������������F�M�"�#�#�#�#���Y������������� ��������� � � � � �'� � � �
�
�
� .�.�.�}�}�}�}�}�M�}�}�}�@-B�-B�-B�-B�-B�]�-B�-B�-B�`T�T�T�T�T�T�T�T�nN �N �N �N �N ��N �N �N �bt �t �t �t �t ��t �t �t �n�����z����
(�
(�
(�
(�
(�%�
(�
(�
(� � � � � �6� � � �
�
�
�
�
��
�
�
�

�

�

�

�

��

�

�

������5�����s)�>A#�#B�(A;�;B�B�	B%�$B%

Youez - 2016 - github.com/yon3zu
LinuXploit