AlkantarClanX12
Current Path : /proc/self/root/usr/lib64/python3.8/email/__pycache__/ |
Current File : //proc/self/root/usr/lib64/python3.8/email/__pycache__/parser.cpython-38.opt-2.pyc |
U e5d� � @ s| d dddddgZ ddlmZmZ ddlmZmZ dd lmZ G d d � d �Z G dd� de �Z G dd� d�ZG d d� de�ZdS )�Parser�HeaderParser�BytesParser�BytesHeaderParser� FeedParser�BytesFeedParser� )�StringIO� TextIOWrapper)r r )�compat32c @ s0 e Zd Zd ed�dd�Zddd�Zddd �ZdS ) r N��policyc C s || _ || _d S �N)�_classr )�selfr r � r �$/usr/lib64/python3.8/email/parser.py�__init__ s zParser.__init__Fc C s@ t | j| jd�}|r|�� |�d�}|s,q8|�|� q|�� S )Nr i )r r r Z_set_headersonly�readZfeed�close)r �fp�headersonlyZ feedparser�datar r r �parse) s zParser.parsec C s | j t|�|d�S )N�r )r r �r �textr r r r �parsestr; s zParser.parsestr)N)F)F)�__name__� __module__�__qualname__r r r r r r r r r s c @ s e Zd Zddd�Zddd�ZdS ) r Tc C s t �| |d�S �NT)r r �r r r r r r r H s zHeaderParser.parsec C s t �| |d�S r )r r r r r r r K s zHeaderParser.parsestrN)T)T)r r r r r r r r r r G s c @ s( e Zd Zdd� Zd dd�Zd dd�ZdS )r c O s t ||�| _d S r )r �parser)r �args�kwr r r r Q s zBytesParser.__init__Fc C s0 t |ddd�}z| j�||�W �S |�� X d S )N�ascii�surrogateescape)�encoding�errors)r �detachr"