| 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 : |
a
OԼa�B � @ s6 d Z ddlmZ dZddlZddlZddlZddlZddlZddl m
Z
ddlmZm
Z
mZ ejdkrjeZG dd � d e�ZG d
d� de�Zdd
� ZG dd� de
�ZG dd� de
�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG d 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�� r c @ s e Zd ZdS )�
InputErrorN��__name__�
__module__�__qualname__� r r �//usr/lib/python3.9/site-packages/docutils/io.pyr � r c @ s e Zd ZdS )�OutputErrorNr
r r r r r r r c
C s8 zt �| j�t �|�kW S tttfy2 Y dS 0 dS )aN Test, 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)�streamr r r r �check_encoding s
r c @ sh e Zd ZdZdZdZddd�Zdd� Zd d
� Zdd� Z e
�d
�Ze
jdfe
jdfe
jdffZdd� ZdS )�Inputz1
Abstract base class for input wrappers.
�inputN�strictc C s. || _ || _|| _|| _|s$| j| _d | _d S �N)r �
error_handler�source�source_path�default_source_path�successful_encoding)�selfr r r r r r r �__init__6 s zInput.__init__c C s d| j | j| jf S )Nz%s: source=%r, source_path=%r)� __class__r r �r# r r r �__repr__J s
�zInput.__repr__c C s t �d S r ��NotImplementedErrorr&