Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/docutils/__pycache__/ |
Upload File : |
o !5p`�A � @ s. d Z ddlmZ dZddlZddlZddlZddlZddlm Z ddl mZmZm Z ejdkr1eZG 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_function�reStructuredTextN)� TransformSpec)�locale_encoding�ErrorString�ErrorOutput�� r c @ � e Zd ZdS )� InputErrorN��__name__� __module__�__qualname__� r r �-/usr/lib/python3/dist-packages/docutils/io.pyr � r c @ r )�OutputErrorNr r r r r r r r c C s4 zt �| j�t �|�kW S tttfy Y dS w )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 @ sp e Zd ZdZdZdZ ddd�Zdd� Zd d � Zdd� Z e �d �Z e jdfe jdfe jdffZ dd� ZdS )�Inputz1 Abstract base class for input wrappers. �inputN�strictc C s6 || _ || _ || _ || _ |s| j| _d | _d S �N)r � error_handler�source�source_path�default_source_path�successful_encoding)�selfr! r"