文件操作 - io.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/docutils/__pycache__/io.cpython-311.pyc
编辑文件内容
� /��bS � �� � d Z dZddlZddlZddlZddlZddlZddlZddlm Z ej � � d p ej � � d Ze� � � Zn$# e$ rZdej v rdZndZY dZ[ndZ[w dZY nxY w ej e� � n# eef$ r dZY nw xY w G d� d e� � Z G d � de� � Zd� Zd � Z G d� de � � Z G d� de � � Z G d� d� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z! G d � d!e� � Z" G d"� 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 � � e Zd ZdS )� InputErrorN��__name__� __module__�__qualname__� � �-/usr/lib/python3/dist-packages/docutils/io.pyr r 0 � � � � � � � � r r c � � e Zd ZdS )�OutputErrorNr r r r r r 1 r r r c � � t j | j � � t j |� � k S # t t t f$ r Y dS w xY 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 s r �check_encodingr 4 sQ � ���}�V�_�-�-���x�1H�1H�H�H�����3� � � ��t�t����s �.1 �A�Ac �$ � | j j � d| � �S )z5Return string representation of Exception `err`. z: )� __class__r )�errs r �error_stringr D s � � �m�$�-�-��-�-�-r c � � e Zd ZdZdZdZ dd�Zd� Zd� Zd� Z e j d � � Z e j d fe j dfe j dffZ d � Zd� ZdS )�Inputz1 Abstract base class for input wrappers. �inputN�strictc �p � || _ || _ || _ || _ |s| j | _ d | _ d S �N)r � error_handler�source�source_path�default_source_path�successful_encoding)�selfr'