| Server IP : 3.96.16.70 / Your IP : 216.73.216.15 Web Server : Apache System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3.9/site-packages/docutils/__pycache__/ |
Upload File : |
a
�?�]}A � @ s. d Z ddlmZ dZddlZddlZddlZddlZddlm Z ddl
mZmZm
Z
ejdkrbeZG 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__5 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__I s
�zInput.__repr__c C s t �d S r ��NotImplementedErrorr&