$39 GRAYBYTE WORDPRESS FILE MANAGER $82

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

/lib64/python3.6/email/__pycache__/

HOME
Current File : /lib64/python3.6/email/__pycache__//generator.cpython-36.pyc
3

���i�S�@s�dZdddgZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZdd	l
mZd
ZdZejd�Zejd
ej�Zejd�Zejd�ZGdd�d�ZGdd�de�ZdZGdd�de�Zeeejd��ZdeZej Z dS)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]s\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�outfpr
rr�r�'/usr/lib64/python3.6/email/generator.py�__init__'szGenerator.__init__cCs|jj|�dS)N)r�write)r�srrrrGszGenerator.writeFcCs�|jdkr|jn|j}|dk	r*|j|d�}|jdk	rB|j|jd�}|j|_|j|j�|_d|_|j|j�|_|j}|j}zL||_||_|r�|j	�}|s�dt
jt
j
��}|j||j�|j
|�Wd||_||_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)�max_line_length�zFrom nobody )r�clonerr�_NL�_encode�_encoded_NLZ_EMPTY�_encoded_EMPTYZget_unixfrom�timeZctimer�_write)r�msg�unixfromrrZold_gen_policyZold_msg_policyZufromrrr�flattenKs,
zGenerator.flattencCs|j||jd|jd�S)z1Clone this generator with the exact same options.N)r)�	__class__rr)r�fprrrr|szGenerator.clonecCst�S)N)r)rrrr�_new_buffer�szGenerator._new_buffercCs|S)Nr)rrrrrr�szGenerator._encodecCsX|sdStj|�}x*|dd�D]}|j|�|j|j�q W|drT|j|d�dS)N����r)r))�NLCRE�splitrr)r�lines�linerrr�_write_lines�s

zGenerator._write_linescCs�|j}z"d|_|j�|_}|j|�Wd||_|j}|`X|rht|�}|jd|d�|jd|d�t|dd�}|dkr�|j|�n||�|jj|j	��dS)Nzcontent-transfer-encodingrzcontent-typer(�_write_headers)
r�
_munge_cter'�	_dispatchrZreplace_header�getattrr/r�getvalue)rr"ZoldfpZsfpZ	munge_cte�methrrrr!�s"zGenerator._writecCst|j�}|j�}tj||f�jdd�}t|d|d�}|dkrh|jdd�}t|d|d�}|dkrh|j}||�dS)N�-r
Z_handle_)�get_content_maintype�get_content_subtype�
UNDERSCORE�join�replacer2�
_writeBody)rr"�main�subZspecificr4Zgenericrrrr1�szGenerator._dispatchcCs�x�|j�D]�\}}|jj||�}|jjr�|jj}|j|jj�sRtd|�d|����|}|j|�rr|dt|��}tj	|�r�td|����|j
|�q
W|j
|j�dS)Nz folded header does not end with z: z folded header contains newline: )�	raw_itemsrZfold�verify_generated_headersr�endswithr	�len�NEWLINE_WITHOUT_FWSP�searchrr)rr"�h�v�foldedr�folded_no_lineseprrrr/�s

zGenerator._write_headerscCs�|j�}|dkrdSt|t�s.tdt|���t|j�r~|jd�}|dk	r~t|�}|d=|j	||�|j�}|d|df|_
|jr�tj
d|�}|j|�dS)Nzstring payload expected: %s�charsetzcontent-transfer-encodingzcontent-typez>From )�get_payload�
isinstance�str�	TypeError�typer�_payloadZ	get_paramrZset_payloadr0r�fcrer=r.)rr"�payloadrHrrr�_handle_text�s"


zGenerator._handle_textcCs�g}|j�}|dkrg}n(t|t�r2|j|�dSt|t�sB|g}x>|D]6}|j�}|j|�}|j|d|jd�|j	|j
��qHW|j�}|s�|jj
|�}|j|�}|j|�|jdk	r�|jr�tjd|j�}	n|j}	|j|	�|j|j�|jd||j�|�r|jj|jd��x4|D],}
|j|jd||j�|jj|
��qW|j|jd|d|j�|jdk	�r�|j�r�tjd|j�}n|j}|j|�dS)NF)r#rz>From z--r)rIrJrKr�listr'rr$r�appendr3Zget_boundaryrr9�_make_boundaryZset_boundary�preamblerrOr=r.r�pop�epilogue)rr"ZmsgtextsZsubparts�partr�g�boundaryZalltextrUZ	body_partrWrrr�_handle_multipart
sJ









zGenerator._handle_multipartcCs0|j}|jdd�|_z|j|�Wd||_XdS)Nr)r)rrr[)rr"�prrr�_handle_multipart_signedGs
z"Generator._handle_multipart_signedcCs�g}x�|j�D]t}|j�}|j|�}|j|d|jd�|j�}|j|j�}|rx|d|jkrx|j	|jj
|dd���q|j	|�qW|jj|jj
|��dS)NF)r#rr(r)r))
rIr'rr$rr3r+rrrSr9rr)rr"ZblocksrXrrY�textr,rrr�_handle_message_delivery_statusRs
z)Generator._handle_message_delivery_statuscCs^|j�}|j|�}|j}t|t�rD|j|jd�d|jd�|j�}n
|j	|�}|j
j|�dS)NrF)r#r)r'rrNrJrRr$rIrr3rrr)rr"rrYrPrrr�_handle_messagegs




zGenerator._handle_messagecCsztjtj�}d	t|d}|dkr(|S|}d}xD|jdtj|�dtj�}|j	|�sZP|dt
|�}|d7}q2W|S)
N�=�z==rz^--z(--)?$�.r(z===============)�randomZ	randrange�sys�maxsize�_fmt�_compile_re�re�escape�	MULTILINErCrK)�clsr^�tokenrZ�bZcounterZcrerrrrT�s
zGenerator._make_boundarycCstj||�S)N)ri�compile)rlr�flagsrrrrh�szGenerator._compile_re)NN)FN)N)�__name__�
__module__�__qualname__�__doc__rrr$rr'rr.r!r1r/rQr;r[r]r_r`�classmethodrTrhrrrrrs*
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|jj|jdd��dS)N�ascii�surrogateescape)rr�encode)rrrrrr�szBytesGenerator.writecCst�S)N)r)rrrrr'�szBytesGenerator._new_buffercCs
|jd�S)Nrv)rx)rrrrrr�szBytesGenerator._encodecCs�x�|j�D]�\}}|jj||�}|jjr�|jjj�}|j|�sRtd|�d|����|}|j|�rr|dt|��}t	j
|�r�td|����|jj|�q
W|j|j
�dS)Nz folded header does not end with z: z folded header contains newline: )r>rZfold_binaryr?rrxr@r	rA�NEWLINE_WITHOUT_FWSP_BYTESrCrrr)rr"rDrErFrrGrrrr/�s


zBytesGenerator._write_headerscs^|jdkrdSt|j�rJ|jjdkrJ|jr<tjd|j�|_|j|j�ntt	|�j
|�dS)NZ7bitz>From )rNrrZcte_typerrOr=r.�superrrQ)rr")r%rrrQ�s
zBytesGenerator._handle_textcCstj|jd�|�S)Nrv)rirorx)rlrrprrrrh�szBytesGenerator._compile_re)
rqrrrsrtrr'rr/rQr;rurh�
__classcell__rr)r%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.
    N)r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�_FMTrg)rrr
rZfmtrrrrr�s
zDecodedGenerator.__init__cCs�x�|j�D]v}|j�}|dkr4t|jdd�|d�q
|dkr>q
t|j|j�|j�|j�|jd�|jdd�|jd	d
�d�|d�q
WdS)Nr^F)�decode)�fileZ	multipartz
[no filename]zContent-Descriptionz[no description]zContent-Transfer-Encodingz
[no encoding])rM�maintype�subtype�filenameZdescription�encoding)	�walkr6�printrIrgZget_content_typer7�get_filename�get)rr"rXrrrrr1�s 
zDecodedGenerator._dispatch)NNN)rqrrrsrtrr1rrrrr�sr(z%%0%dd)!rt�__all__rirer rd�copyr�iorrZemail.utilsrZemail.errorsr	r8�NLror*rkrOrBryrrr|rrA�reprrfZ_widthrgrTrrrr�<module>s0



|?;


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Apr 2026 7.12 PM
root / root
0755
__init__.cpython-36.opt-1.pyc
1.632 KB
2 Apr 2026 3.01 PM
root / root
0644
__init__.cpython-36.opt-2.pyc
1.037 KB
2 Apr 2026 3.01 PM
root / root
0644
__init__.cpython-36.pyc
1.632 KB
2 Apr 2026 3.01 PM
root / root
0644
_encoded_words.cpython-36.opt-1.pyc
5.455 KB
2 Apr 2026 3.01 PM
root / root
0644
_encoded_words.cpython-36.opt-2.pyc
3.613 KB
2 Apr 2026 3.01 PM
root / root
0644
_encoded_words.cpython-36.pyc
5.455 KB
2 Apr 2026 3.01 PM
root / root
0644
_header_value_parser.cpython-36.opt-1.pyc
74.338 KB
2 Apr 2026 3.01 PM
root / root
0644
_header_value_parser.cpython-36.opt-2.pyc
58.233 KB
2 Apr 2026 3.01 PM
root / root
0644
_header_value_parser.cpython-36.pyc
74.389 KB
2 Apr 2026 3.01 PM
root / root
0644
_parseaddr.cpython-36.opt-1.pyc
12.206 KB
2 Apr 2026 3.01 PM
root / root
0644
_parseaddr.cpython-36.opt-2.pyc
9.315 KB
2 Apr 2026 3.01 PM
root / root
0644
_parseaddr.cpython-36.pyc
12.206 KB
2 Apr 2026 3.01 PM
root / root
0644
_policybase.cpython-36.opt-1.pyc
14.93 KB
2 Apr 2026 3.01 PM
root / root
0644
_policybase.cpython-36.opt-2.pyc
5.875 KB
2 Apr 2026 3.01 PM
root / root
0644
_policybase.cpython-36.pyc
14.93 KB
2 Apr 2026 3.01 PM
root / root
0644
base64mime.cpython-36.opt-1.pyc
3.145 KB
2 Apr 2026 3.01 PM
root / root
0644
base64mime.cpython-36.opt-2.pyc
1.409 KB
2 Apr 2026 3.01 PM
root / root
0644
base64mime.cpython-36.pyc
3.145 KB
2 Apr 2026 3.01 PM
root / root
0644
charset.cpython-36.opt-1.pyc
11.207 KB
2 Apr 2026 3.01 PM
root / root
0644
charset.cpython-36.opt-2.pyc
5.021 KB
2 Apr 2026 3.01 PM
root / root
0644
charset.cpython-36.pyc
11.243 KB
2 Apr 2026 3.01 PM
root / root
0644
contentmanager.cpython-36.opt-1.pyc
7.119 KB
2 Apr 2026 3.01 PM
root / root
0644
contentmanager.cpython-36.opt-2.pyc
7.119 KB
2 Apr 2026 3.01 PM
root / root
0644
contentmanager.cpython-36.pyc
7.119 KB
2 Apr 2026 3.01 PM
root / root
0644
encoders.cpython-36.opt-1.pyc
1.604 KB
2 Apr 2026 3.01 PM
root / root
0644
encoders.cpython-36.opt-2.pyc
1.261 KB
2 Apr 2026 3.01 PM
root / root
0644
encoders.cpython-36.pyc
1.604 KB
2 Apr 2026 3.01 PM
root / root
0644
errors.cpython-36.opt-1.pyc
6.201 KB
2 Apr 2026 3.01 PM
root / root
0644
errors.cpython-36.opt-2.pyc
4.657 KB
2 Apr 2026 3.01 PM
root / root
0644
errors.cpython-36.pyc
6.201 KB
2 Apr 2026 3.01 PM
root / root
0644
feedparser.cpython-36.opt-1.pyc
10.246 KB
2 Apr 2026 3.01 PM
root / root
0644
feedparser.cpython-36.opt-2.pyc
8.62 KB
2 Apr 2026 3.01 PM
root / root
0644
feedparser.cpython-36.pyc
10.396 KB
2 Apr 2026 3.01 PM
root / root
0644
generator.cpython-36.opt-1.pyc
12.958 KB
2 Apr 2026 3.01 PM
root / root
0644
generator.cpython-36.opt-2.pyc
9.349 KB
2 Apr 2026 3.01 PM
root / root
0644
generator.cpython-36.pyc
12.958 KB
2 Apr 2026 3.01 PM
root / root
0644
header.cpython-36.opt-1.pyc
16.096 KB
2 Apr 2026 3.01 PM
root / root
0644
header.cpython-36.opt-2.pyc
10.604 KB
2 Apr 2026 3.01 PM
root / root
0644
header.cpython-36.pyc
16.096 KB
2 Apr 2026 3.01 PM
root / root
0644
headerregistry.cpython-36.opt-1.pyc
20.727 KB
2 Apr 2026 3.01 PM
root / root
0644
headerregistry.cpython-36.opt-2.pyc
15.091 KB
2 Apr 2026 3.01 PM
root / root
0644
headerregistry.cpython-36.pyc
20.781 KB
2 Apr 2026 3.01 PM
root / root
0644
iterators.cpython-36.opt-1.pyc
1.867 KB
2 Apr 2026 3.01 PM
root / root
0644
iterators.cpython-36.opt-2.pyc
1.26 KB
2 Apr 2026 3.01 PM
root / root
0644
iterators.cpython-36.pyc
1.867 KB
2 Apr 2026 3.01 PM
root / root
0644
message.cpython-36.opt-1.pyc
37.104 KB
2 Apr 2026 3.01 PM
root / root
0644
message.cpython-36.opt-2.pyc
20.9 KB
2 Apr 2026 3.01 PM
root / root
0644
message.cpython-36.pyc
37.104 KB
2 Apr 2026 3.01 PM
root / root
0644
parser.cpython-36.opt-1.pyc
5.593 KB
2 Apr 2026 3.01 PM
root / root
0644
parser.cpython-36.opt-2.pyc
2.644 KB
2 Apr 2026 3.01 PM
root / root
0644
parser.cpython-36.pyc
5.593 KB
2 Apr 2026 3.01 PM
root / root
0644
policy.cpython-36.opt-1.pyc
9.395 KB
2 Apr 2026 3.01 PM
root / root
0644
policy.cpython-36.opt-2.pyc
3.323 KB
2 Apr 2026 3.01 PM
root / root
0644
policy.cpython-36.pyc
9.395 KB
2 Apr 2026 3.01 PM
root / root
0644
quoprimime.cpython-36.opt-1.pyc
7.502 KB
2 Apr 2026 3.01 PM
root / root
0644
quoprimime.cpython-36.opt-2.pyc
4.106 KB
2 Apr 2026 3.01 PM
root / root
0644
quoprimime.cpython-36.pyc
7.502 KB
2 Apr 2026 3.01 PM
root / root
0644
utils.cpython-36.opt-1.pyc
12.897 KB
2 Apr 2026 3.01 PM
root / root
0644
utils.cpython-36.opt-2.pyc
9.206 KB
2 Apr 2026 3.01 PM
root / root
0644
utils.cpython-36.pyc
12.897 KB
2 Apr 2026 3.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF