403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/docutils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/docutils/__pycache__/io.cpython-39.opt-1.pyc
a

OԼa�B�@s6dZddlmZdZddlZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
mZejdkrjeZGdd	�d	e�ZGd
d�de�Zdd
�ZGdd�de
�ZGdd�de
�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZdS)"z
I/O classes provide a uniform API for low-level input and output.  Subclasses
exist for a variety of input/output mechanisms.
�)�print_functionZreStructuredTextN)�
TransformSpec)�locale_encoding�ErrorString�ErrorOutput��rc@seZdZdS)�
InputErrorN��__name__�
__module__�__qualname__�rr�//usr/lib/python3.9/site-packages/docutils/io.pyr	�r	c@seZdZdS)�OutputErrorNr
rrrrrrrc
Cs8zt�|j�t�|�kWStttfy2YdS0dS)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)�streamrrrr�check_encodings
rc@sheZdZdZdZdZddd�Zdd�Zd	d
�Zdd�Z	e
�d
�Ze
jdfe
jdfe
jdffZdd�ZdS)�Inputz1
    Abstract base class for input wrappers.
    �inputN�strictcCs.||_||_||_||_|s$|j|_d|_dS�N)r�
error_handler�source�source_path�default_source_path�successful_encoding)�selfrr rrrrr�__init__6szInput.__init__cCsd|j|j|jfS)Nz%s: source=%r, source_path=%r)�	__class__rr �r#rrr�__repr__Js
�zInput.__repr__cCst�dSr��NotImplementedErrorr&rrr�readNsz
Input.readcCs�|jr|j��dkrt|t�r"|S|jr2|jg}n.|�|�}|rH|g}nddg}tr`|�dt�|D]X}z&t|||j�}||_|�	dd�WSt
tfy�}z|}WYd}~qdd}~00qdt
dd	�d
d�|D��t
|�f��dS)a
        Decode a string, `data`, heuristically.
        Raise UnicodeError if unsuccessful.

        The client application should call ``locale.setlocale`` at the
        beginning of processing::

            locale.setlocale(locale.LC_ALL, '')
        �unicode�utf-8zlatin-1�u�NzEUnable to decode input data.  Tried the following encodings: %s.
(%s)z, cSsg|]}t|��qSr)�repr)�.0�encrrr�
<listcomp>~rz Input.decode.<locals>.<listcomp>)r�lower�
isinstancer+�determine_encoding_from_datar�insertrr"�replace�UnicodeErrorr�joinr)r#�data�	encodings�
data_encodingr1Zdecoded�err�errorrrr�decodeQs2



���zInput.decodescoding[:=]\s*([-\w.]+)r,z	utf-16-bez	utf-16-lecCs`|jD]\}}|�|�r|Sq|��dd�D](}|j�|�}|r2|�d��d�Sq2dS)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�groupr?)r#r:Zstart_bytesr�line�matchrrrr5�s

z"Input.determine_encoding_from_data)NNNr)rrr
�__doc__�component_typer!r$r'r*r?�re�compilerEr�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LErBr5rrrrr,s�
0
�rc@s:eZdZdZdZdZd
dd�Zdd�Zd	d
�Zdd�Z	dS)�Outputz2
    Abstract base class for output wrappers.
    �outputNrcCs,||_|pd|_||_||_|s(|j|_dS)Nr)rr�destination�destination_path�default_destination_path)r#rSrTrrrrrr$�s
zOutput.__init__cCsd|j|j|jfS)Nz'%s: destination=%r, destination_path=%r)r%rSrTr&rrrr'�s�zOutput.__repr__cCst�dS)z;`data` is a Unicode string, to be encoded by `self.encode`.Nr(�r#r:rrr�write�szOutput.writecCs:|jr|j��dkr|St|t�s&|S|�|j|j�SdS)Nr+)rr3r4r+�encoderrVrrrrX�s

z
Output.encode)NNNr)
rrr
rJrKrUr$r'rWrXrrrrrQ�s�
rQc@sLeZdZdZdddddejdkr$dndfdd	�Zd
d�Zdd
�Zdd�Z	dS)�	FileInputz5
    Input for single, simple file-like objects.
    NrTr�rZrUc	
Cst�|||||�||_t�|_|dur�|r�tjdkrF|j|jd�}ni}zt	||fi|��|_
Wq�ty�}zt|j
|j|��WYd}~q�d}~00q�tj|_
n2tjdkr�t|j
|j�dur�td|j|j
jf��|s�z|j
j|_Wnty�Yn0dS)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 'rU' provides universal newline support
              for text files with Python 2.x.
        Nr�r�errorsFzOEncoding clash: encoding given is "%s" but source is opened with encoding "%s".)rr$�	autocloser�_stderr�sys�version_inforr�openr�IOErrorr	�errno�strerror�stdinrr8�namer r)	r#rr rrr]�mode�kwargsr>rrrr$�s4
�(

��zFileInput.__init__c
Cs�z�zD|jtjur:tjdkr:|jj��}d�|���d}n
|j��}Wnftt	fy�}zJ|j
s�|jr�t|jd�}|��}|�
�d�|���d}n�WYd}~n
d}~00W|jr�|�
�n|jr�|�
�0|�|�S)zU
        Read and decode a single file and return the data (Unicode string).
        r�
�rbN)rr_rer`�bufferr*r9rDr8rrr ra�closer]r?)r#r:r=Zb_sourcerrrr*s"
�
zFileInput.readcCs|���d�S)zK
        Return lines of a single file as list of Unicode strings.
        T)r*rDr&rrr�	readlinesszFileInput.readlinescCs|jtjur|j��dSr)rr_rerlr&rrrrl!szFileInput.close)
rrr
rJr_r`r$r*rmrlrrrrrY�s�
/rYc@s6eZdZdZdZddd�Zdd	�Zd
d�Zdd
�ZdS)�
FileOutputz6
    Output for single, simple file-like objects.
    �wNrTcCs�t�|||||�d|_||_|dur6tjdtdd�|durD||_t�|_	|durj|r`d|_q�t
j|_n6|r�t
|jd�r�||jjkr�td|jj|f|j	d	�|s�z|jj|_Wnty�Yn0dS)
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.
        TNziio.FileOutput: initialization argument "handle_io_errors" is ignored and will be removed in Docutils 1.2.r@)�
stacklevelFrgz?Warning: Destination mode "%s" differs from specified mode "%s")�file)rQr$�openedr]�warnings�warn�DeprecationWarningrgrr^r_�stdoutrS�hasattr�printrfrTr)r#rSrTrrr]Zhandle_io_errorsrgrrrr$2s@
��
�
�
�
��zFileOutput.__init__c
Cs�tjdkr$d|jvr$|j|jd�}ni}zt|j|jfi|��|_Wn6tyz}zt	|j
|j|j��WYd}~n
d}~00d|_dS)Nr�br[T)
r_r`rgrrrarTrSrbrrcrdrr)r#rhr>rrrraas�
�zFileOutput.opencCsx|js|��d|jvr"tjdks4t|j|j�durf|�|�}tjdkrft	j
dkrf|�dtt	j
d��}z�z|j�
|�Wn�t�y}z|tjdkr�t|t�r�z|jj�
|�WnHty�t|j|j�dur�td|jp�d|jj|jf��n|�Yn0WYd	}~nHd	}~0ttf�yL}z"td
|jt|�f��WYd	}~n
d	}~00W|j�rt|��n|j�rr|��0|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.
        ryrF�
rirAz;Encoding of %s (%s) differs 
  from specified encoding (%s)rSNz:Unable to encode output data. output-encoding is: %s.
(%s))rrrargr_r`rrSrrX�os�linesepr7�bytesrWrr4rkr�
ValueErrorrTr8rrr]rl)r#r:r=rrrrWosJ�
��
����
�
zFileOutput.writecCs&|jtjtjfvr"|j��d|_dS)NF)rSr_rv�stderrrlrrr&rrrrl�s
zFileOutput.close)NNNrTNN)	rrr
rJrgr$rarWrlrrrrrn&s�
/'rnc@seZdZdZdZdS)�BinaryFileOutputzL
    A version of docutils.io.FileOutput which writes to a binary file.
    �wbN)rrr
rJrgrrrrr��sr�c@seZdZdZdZdd�ZdS)�StringInputz
    Direct string input.
    �<string>cCs|�|j�S)z$Decode and return the source string.)r?rr&rrrr*�szStringInput.readN�rrr
rJr!r*rrrrr��sr�c@seZdZdZdZdd�ZdS)�StringOutputz
    Direct string output.
    r�cCs|�|�|_|jS)z=Encode `data`, store it in `self.destination`, and return it.)rXrSrVrrrrW�szStringOutput.writeN�rrr
rJrUrWrrrrr��sr�c@seZdZdZdZdd�ZdS)�	NullInputz)
    Degenerate input: read nothing.
    z
null inputcCsdS)zReturn a null string.r.rr&rrrr*�szNullInput.readNr�rrrrr��sr�c@seZdZdZdZdd�ZdS)�
NullOutputz+
    Degenerate output: write nothing.
    znull outputcCsdS)z6Do nothing ([don't even] send data to the bit bucket).NrrVrrrrW�szNullOutput.writeNr�rrrrr��sr�c@seZdZdZdZdd�ZdS)�DocTreeInputzm
    Adapter for document tree input.

    The document tree must be passed in the ``source`` parameter.
    z
doctree inputcCs|jS)zReturn the document tree.)rr&rrrr*�szDocTreeInput.readNr�rrrrr��sr�) rJZ
__future__rZ
__docformat__rr{rLr_rsZdocutilsrZdocutils.utils.error_reportingrrrr`�strr+rbr	rrrrQrYrnr�r�r�r�r�r�rrrr�<module>s0
p0Zv	



Youez - 2016 - github.com/yon3zu
LinuXploit