$11 GRAYBYTE WORDPRESS FILE MANAGER $34

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python38/lib64/python3.8/email/__pycache__/

HOME
Current File : /opt/alt/python38/lib64/python3.8/email/__pycache__//generator.cpython-38.pyc
U

i�f�Q�@s�dZdddgZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZdd	l
mZd
ZdZe�d�Ze�d
ej�Ze�d�ZGdd�d�ZGdd�de�ZdZGdd�de�Zeeejd��ZdeZejZdS)z:Classes to generate plain text from a message object tree.�	Generator�DecodedGenerator�BytesGenerator�N)�deepcopy)�StringIO�BytesIO)�_has_surrogates)�HeaderWriteError�_�
z
\r\n|\r|\nz^From z\r\n[^ \t]|\r[^ \n\t]|\n[^ \t]c@s�eZdZdZd'dd�dd�Zdd�Zd(d	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZeZdd�Zdd�Zdd �Zd!d"�Zed)d#d$��Zed%d&��ZdS)*rz�Generates output from a Message object tree.

    This basic generator writes the message to the given file object as plain
    text.
    N��policycCs6|dkr|dkrdn|j}||_||_||_||_dS)a�Create the generator for message flattening.

        outfp is the output file-like object for writing the message to.  It
        must have a write() method.

        Optional mangle_from_ is a flag that, when True (the default if policy
        is not set), escapes From_ lines in the body of the message by putting
        a `>' in front of them.

        Optional maxheaderlen specifies the longest length for a non-continued
        header.  When a header line is longer (in characters, with tabs
        expanded to 8 spaces) than maxheaderlen, the header will split as
        defined in the Header class.  Set maxheaderlen to zero to disable
        header wrapping.  The default is 78, as recommended (but not required)
        by RFC 2822.

        The policy keyword specifies a policy object that controls a number of
        aspects of the generator's operation.  If no policy is specified,
        the policy associated with the Message object passed to the
        flatten method is used.

        NT)�mangle_from_�_fp�
_mangle_from_�maxheaderlenr
)�self�outfprrr
�r�4/opt/alt/python38/lib64/python3.8/email/generator.py�__init__&szGenerator.__init__cCs|j�|�dS�N)r�write�r�srrrrFszGenerator.writeFcCs�|jdkr|jn|j}|dk	r*|j|d�}|jdk	rB|j|jd�}|j|_|�|j�|_d|_|�|j�|_|j}|j}zL||_||_|r�|�	�}|s�dt
�t
�
��}|�||j�|�
|�W5||_||_XdS)a�Print the message object tree rooted at msg to the output file
        specified when the Generator instance was created.

        unixfrom is a flag that forces the printing of a Unix From_ delimiter
        before the first object in the message tree.  If the original message
        has no From_ delimiter, a `standard' one is crafted.  By default, this
        is False to inhibit the printing of any From_ delimiter.

        Note that for subobjects, no From_ line is printed.

        linesep specifies the characters used to indicate a new line in
        the output.  The default value is determined by the policy specified
        when the Generator instance was created or, if none was specified,
        from the policy associated with the msg.

        N)�linesep�Zmax_line_length�zFrom nobody )r
�clonerr�_NL�_encode�_encoded_NLZ_EMPTY�_encoded_EMPTYZget_unixfrom�time�ctimer�_write)r�msg�unixfromrr
Zold_gen_policyZold_msg_policyZufromrrr�flattenJs,
zGenerator.flattencCs|j||jd|jd�S)z1Clone this generator with the exact same options.Nr)�	__class__rr
)r�fprrrr{s
�zGenerator.clonecCst�Sr)r�rrrr�_new_buffer�szGenerator._new_buffercCs|Srrrrrrr �szGenerator._encodecCsT|sdSt�|�}|dd�D]}|�|�|�|j�q|drP|�|d�dS)N���)�NLCRE�splitrr)r�lines�linerrr�_write_lines�s

zGenerator._write_linescCs�|j}z"d|_|��|_}|�|�W5||_|j}|`X|r�t|�}|�d�dkrd|d|d<n|�d|d�|�d|d�t|dd�}|dkr�|�|�n||�|j�	|�
��dS)N�content-transfer-encodingr�Content-Transfer-Encoding�content-type��_write_headers)r�
_munge_cter,�	_dispatchr�getZreplace_header�getattrr7r�getvalue)rr&ZoldfpZ	munge_cteZsfp�methrrrr%�s&zGenerator._writecCst|��}|��}t�||f��dd�}t|d|d�}|dkrh|�dd�}t|d|d�}|dkrh|j}||�dS)N�-r
Z_handle_)�get_content_maintype�get_content_subtype�
UNDERSCORE�join�replacer;�
_writeBody)rr&�main�subZspecificr=Zgenericrrrr9�szGenerator._dispatchcCs�|��D]�\}}|j�||�}|jjr�|jj}|�|jj�sPtd|�d|����|}|�|�rp|dt|��}t�	|�r�td|����|�
|�q|�
|j�dS)Nz folded header does not end with z: z folded header contains newline: )�	raw_itemsr
ZfoldZverify_generated_headersr�endswithr	�len�NEWLINE_WITHOUT_FWSP�searchrr)rr&�h�vZfoldedrZfolded_no_lineseprrrr7�s"�

�zGenerator._write_headerscCs�|��}|dkrdSt|t�s.tdt|���t|j�r~|�d�}|dk	r~t|�}|d=|�	||�|��}|d|df|_
|jr�t�
d|�}|�|�dS)Nzstring payload expected: %s�charsetr3r5�>From )�get_payload�
isinstance�str�	TypeError�typer�_payloadZ	get_paramrZset_payloadr8r�fcrerFr2)rr&�payloadrNrrr�_handle_text�s$


�zGenerator._handle_textcCs�g}|��}|dkrg}n(t|t�r2|�|�dSt|t�sB|g}|D]6}|��}|�|�}|j|d|jd�|�	|�
��qF|��}|s�|j�
|�}|�|�}|�|�|jdk	r�|jr�t�d|j�}	n|j}	|�|	�|�|j�|�d||j�|�r|j�|�d��|D],}
|�|jd||j�|j�|
��q|�|jd|d|j�|jdk	�r�|j�r�t�d|j�}n|j}|�|�dS)NF�r'rrOz--r)rPrQrRr�listr,rr(r�appendr<Zget_boundaryr!rB�_make_boundaryZset_boundary�preamblerrVrFr2r�pop�epilogue)rr&ZmsgtextsZsubparts�partr�g�boundaryZalltextr]Z	body_partr_rrr�_handle_multipartsJ







zGenerator._handle_multipartcCs0|j}|jdd�|_z|�|�W5||_XdS)Nrr)r
rrc)rr&�prrr�_handle_multipart_signedJs
z"Generator._handle_multipart_signedcCs�g}|��D]t}|��}|�|�}|j|d|jd�|��}|�|j�}|rv|d|jkrv|�	|j�
|dd���q|�	|�q|j�|j�
|��dS)NFrYr-)
rPr,rr(rr<r/r!r"r[rBrr)rr&Zblocksr`rra�textr0rrr�_handle_message_delivery_statusUs
z)Generator._handle_message_delivery_statuscCs^|��}|�|�}|j}t|t�rD|j|�d�d|jd�|��}n
|�	|�}|j
�|�dS)NrFrY)r,rrUrQrZr(rPrr<r rr)rr&rrarWrrr�_handle_messagejs




zGenerator._handle_messagecCsvt�tj�}dt|d}|dkr(|S|}d}|�dt�|�dtj�}|�	|�sXqr|dt
|�}|d7}q0|S)Nz===============z==rz^--z(--)?$�.r6)�randomZ	randrange�sys�maxsize�_fmt�_compile_re�re�escape�	MULTILINErKrR)�clsrf�tokenrb�bZcounterZcrerrrr\�s

zGenerator._make_boundarycCst�||�Sr)ro�compile�rrr�flagsrrrrn�szGenerator._compile_re)NN)FN)N)�__name__�
__module__�__qualname__�__doc__rrr(rr,r r2r%r9r7rXrDrcrergrh�classmethodr\rnrrrrrs.	� 
1':csPeZdZdZdd�Zdd�Zdd�Zdd	�Z�fd
d�ZeZ	e
dd
��Z�ZS)ra�Generates a bytes version of a Message object tree.

    Functionally identical to the base Generator except that the output is
    bytes and not string.  When surrogates were used in the input to encode
    bytes, these are decoded back to bytes for output.  If the policy has
    cte_type set to 7bit, then the message is transformed such that the
    non-ASCII bytes are properly content transfer encoded, using the charset
    unknown-8bit.

    The outfp object must accept bytes in its write method.
    cCs|j�|�dd��dS)N�ascii�surrogateescape)rr�encoderrrrr�szBytesGenerator.writecCst�Sr)rr+rrrr,�szBytesGenerator._new_buffercCs
|�d�S�Nr})rrrrrr �szBytesGenerator._encodecCs8|��D]\}}|j�|j�||��q|�|j�dSr)rGrrr
Zfold_binaryr)rr&rLrMrrrr7�szBytesGenerator._write_headerscs\|jdkrdSt|j�rH|jjdksH|jr:t�d|j�|_|�|j�ntt	|��
|�dS)NZ7bitrO)rUrr
Zcte_typerrVrFr2�superrrX)rr&�r)rrrX�s
zBytesGenerator._handle_textcCst�|�d�|�Sr�)rorurrvrrrrn�szBytesGenerator._compile_re)
rxryrzr{rr,r r7rXrDr|rn�
__classcell__rrr�rr�s
zD[Non-text (%(type)s) part of message omitted, filename %(filename)s]c@s(eZdZdZddd�dd�Zdd�ZdS)	rz�Generates a text representation of a message.

    Like the Generator base class, except that non-text parts are substituted
    with a format string representing the part.
    NrcCs.tj|||||d�|dkr$t|_n||_dS)a�Like Generator.__init__() except that an additional optional
        argument is allowed.

        Walks through all subparts of a message.  If the subpart is of main
        type `text', then it prints the decoded payload of the subpart.

        Otherwise, fmt is a format string that is used instead of the message
        payload.  fmt is expanded with the following keywords (in
        %(keyword)s format):

        type       : Full MIME type of the non-text part
        maintype   : Main MIME type of the non-text part
        subtype    : Sub-MIME type of the non-text part
        filename   : Filename of the non-text part
        description: Description associated with the non-text part
        encoding   : Content transfer encoding of the non-text part

        The default value for fmt is None, meaning

        [Non-text (%(type)s) part of message omitted, filename %(filename)s]
        rN)rr�_FMTrm)rrrrZfmtr
rrrr�s�zDecodedGenerator.__init__cCs�|��D]v}|��}|dkr2t|jdd�|d�q|dkr<qt|j|��|��|��|�d�|�dd�|�d	d
�d�|d�qdS)NrfF)�decode)�fileZ	multipartz
[no filename]zContent-Descriptionz[no description]r4z
[no encoding])rT�maintypeZsubtype�filenameZdescription�encoding)	�walkr?�printrPrmZget_content_typer@�get_filenamer:)rr&r`r�rrrr9�s(���	�zDecodedGenerator._dispatch)NNN)rxryrzr{rr9rrrrr�s
�r6z%%0%dd) r{�__all__rorkr#rj�copyr�iorrZemail.utilsrZemail.errorsr	rA�NLrur.rqrVrJrrr�rrI�reprrlZ_widthrmr\rrrr�<module>s0


3;


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
26 Oct 2024 8.34 AM
root / linksafe
0755
__init__.cpython-38.opt-1.pyc
1.666 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
__init__.cpython-38.opt-2.pyc
1.056 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
__init__.cpython-38.pyc
1.666 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_encoded_words.cpython-38.opt-1.pyc
5.567 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_encoded_words.cpython-38.opt-2.pyc
3.726 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_encoded_words.cpython-38.pyc
5.567 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_header_value_parser.cpython-38.opt-1.pyc
78.103 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_header_value_parser.cpython-38.opt-2.pyc
61.626 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_header_value_parser.cpython-38.pyc
78.149 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_parseaddr.cpython-38.opt-1.pyc
12.19 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_parseaddr.cpython-38.opt-2.pyc
9.3 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_parseaddr.cpython-38.pyc
12.19 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_policybase.cpython-38.opt-1.pyc
14.925 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_policybase.cpython-38.opt-2.pyc
5.889 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
_policybase.cpython-38.pyc
14.925 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
base64mime.cpython-38.opt-1.pyc
3.174 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
base64mime.cpython-38.opt-2.pyc
1.438 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
base64mime.cpython-38.pyc
3.174 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
charset.cpython-38.opt-1.pyc
11.169 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
charset.cpython-38.opt-2.pyc
4.988 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
charset.cpython-38.pyc
11.205 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
contentmanager.cpython-38.opt-1.pyc
7.203 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
contentmanager.cpython-38.opt-2.pyc
7.203 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
contentmanager.cpython-38.pyc
7.203 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
encoders.cpython-38.opt-1.pyc
1.589 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
encoders.cpython-38.opt-2.pyc
1.246 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
encoders.cpython-38.pyc
1.589 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
errors.cpython-38.opt-1.pyc
5.943 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
errors.cpython-38.opt-2.pyc
4.512 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
errors.cpython-38.pyc
5.943 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
feedparser.cpython-38.opt-1.pyc
10.259 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
feedparser.cpython-38.opt-2.pyc
8.635 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
feedparser.cpython-38.pyc
10.407 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
generator.cpython-38.opt-1.pyc
12.674 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
generator.cpython-38.opt-2.pyc
9.062 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
generator.cpython-38.pyc
12.674 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
header.cpython-38.opt-1.pyc
16.068 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
header.cpython-38.opt-2.pyc
10.576 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
header.cpython-38.pyc
16.068 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
headerregistry.cpython-38.opt-1.pyc
21.491 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
headerregistry.cpython-38.opt-2.pyc
15.863 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
headerregistry.cpython-38.pyc
21.542 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
iterators.cpython-38.opt-1.pyc
1.89 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
iterators.cpython-38.opt-2.pyc
1.284 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
iterators.cpython-38.pyc
1.89 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
message.cpython-38.opt-1.pyc
37.005 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
message.cpython-38.opt-2.pyc
20.831 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
message.cpython-38.pyc
37.005 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
parser.cpython-38.opt-1.pyc
5.603 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
parser.cpython-38.opt-2.pyc
2.655 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
parser.cpython-38.pyc
5.603 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
policy.cpython-38.opt-1.pyc
9.446 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
policy.cpython-38.opt-2.pyc
3.377 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
policy.cpython-38.pyc
9.446 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
quoprimime.cpython-38.opt-1.pyc
7.513 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
quoprimime.cpython-38.opt-2.pyc
4.121 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
quoprimime.cpython-38.pyc
7.513 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
utils.cpython-38.opt-1.pyc
11.598 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
utils.cpython-38.opt-2.pyc
8.06 KB
23 Sep 2024 11.26 AM
root / linksafe
0644
utils.cpython-38.pyc
11.598 KB
23 Sep 2024 11.26 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF