/usr/lib64/python3.9/email/__pycache__
NameSizeModeActions
base64mime.cpython-39.opt-1.pyc32390644editdlrm
base64mime.cpython-39.opt-2.pyc14620644editdlrm
base64mime.cpython-39.pyc32390644editdlrm
charset.cpython-39.opt-1.pyc114320644editdlrm
charset.cpython-39.opt-2.pyc51030644editdlrm
charset.cpython-39.pyc114530644editdlrm
contentmanager.cpython-39.opt-1.pyc73600644editdlrm
contentmanager.cpython-39.opt-2.pyc73600644editdlrm
contentmanager.cpython-39.pyc73600644editdlrm
encoders.cpython-39.opt-1.pyc16220644editdlrm
encoders.cpython-39.opt-2.pyc12710644editdlrm
encoders.cpython-39.pyc16220644editdlrm
errors.cpython-39.opt-1.pyc60770644editdlrm
errors.cpython-39.opt-2.pyc46110644editdlrm
errors.cpython-39.pyc60770644editdlrm
feedparser.cpython-39.opt-1.pyc104880644editdlrm
feedparser.cpython-39.opt-2.pyc88250644editdlrm
feedparser.cpython-39.pyc106090644editdlrm
generator.cpython-39.opt-1.pyc131840644editdlrm
generator.cpython-39.opt-2.pyc94850644editdlrm
generator.cpython-39.pyc131840644editdlrm
header.cpython-39.opt-1.pyc164320644editdlrm
header.cpython-39.opt-2.pyc108080644editdlrm
header.cpython-39.pyc164320644editdlrm
headerregistry.cpython-39.opt-1.pyc219300644editdlrm
headerregistry.cpython-39.opt-2.pyc161670644editdlrm
headerregistry.cpython-39.pyc219660644editdlrm
iterators.cpython-39.opt-1.pyc19310644editdlrm
iterators.cpython-39.opt-2.pyc13110644editdlrm
iterators.cpython-39.pyc19310644editdlrm
message.cpython-39.opt-1.pyc379070644editdlrm
message.cpython-39.opt-2.pyc213490644editdlrm
message.cpython-39.pyc379070644editdlrm
parser.cpython-39.opt-1.pyc57460644editdlrm
parser.cpython-39.opt-2.pyc27280644editdlrm
parser.cpython-39.pyc57460644editdlrm
policy.cpython-39.opt-1.pyc96390644editdlrm
policy.cpython-39.opt-2.pyc34240644editdlrm
policy.cpython-39.pyc96390644editdlrm
quoprimime.cpython-39.opt-1.pyc76740644editdlrm
quoprimime.cpython-39.opt-2.pyc41990644editdlrm
quoprimime.cpython-39.pyc76740644editdlrm
utils.cpython-39.opt-1.pyc127350644editdlrm
utils.cpython-39.opt-2.pyc89620644editdlrm
utils.cpython-39.pyc127350644editdlrm
_encoded_words.cpython-39.opt-1.pyc57070644editdlrm
_encoded_words.cpython-39.opt-2.pyc38210644editdlrm
_encoded_words.cpython-39.pyc57070644editdlrm
_header_value_parser.cpython-39.opt-1.pyc803130644editdlrm
_header_value_parser.cpython-39.opt-2.pyc633810644editdlrm
_header_value_parser.cpython-39.pyc803450644editdlrm
_parseaddr.cpython-39.opt-1.pyc123930644editdlrm
_parseaddr.cpython-39.opt-2.pyc94330644editdlrm
_parseaddr.cpython-39.pyc123930644editdlrm
_policybase.cpython-39.opt-1.pyc152660644editdlrm
_policybase.cpython-39.opt-2.pyc60130644editdlrm
_policybase.cpython-39.pyc152660644editdlrm
__init__.cpython-39.opt-1.pyc16670644editdlrm
__init__.cpython-39.opt-2.pyc10420644editdlrm
__init__.cpython-39.pyc16670644editdlrm
Edit: /usr/lib64/python3.9/email/__pycache__/generator.cpython-39.pyc (13184B)
a ä”|jœSã@sêdZgd¢ZddlZddlZddlZddlZddlmZddlm Z m Z ddl m Z ddl mZdZd Ze d ¡Ze d ej¡Ze d ¡Ze d ¡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 „Zd d „Zd d„Zdd„Z dd„Z dd„Z dd„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|dur|durdn|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ú'/usr/lib64/python3.9/email/generator.pyÚ__init__'s zGenerator.__init__cCs|j |¡dS©N)rÚwrite©rÚsrrrrGszGenerator.writeFcCsä|jdur|jn|j}|dur*|j|d}|jdurB|j|jd}|j|_| |j¡|_d|_| |j¡|_|j}|j}zX||_||_|r¸|  ¡}|s¨dt   t   ¡¡}|  ||j¡|  |¡W||_||_n||_||_0dS)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ÚflattenKs0   ÿzGenerator.flattencCs|j||jd|jdS)z1Clone this generator with the exact same options.Nr )Ú __class__rr )rÚfprrrr|s ýzGenerator.clonecCstƒSr)r©rrrrÚ _new_bufferszGenerator._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}z2d|_| ¡|_}| |¡W||_|j}|`n||_|j}|`0|r”t|ƒ}| d¡durt|d|d<n| d|d¡| d|d¡t|ddƒ}|dur´| |¡n||ƒ|j  |  ¡¡dS)Núcontent-transfer-encodingrúContent-Transfer-Encodingú content-typeéÚ_write_headers) rÚ _munge_cter,Ú _dispatchrÚgetZreplace_headerÚgetattrr7rÚgetvalue)rr&ZoldfpZsfpZ munge_cteÚmethrrrr%¨s,  þ  zGenerator._writecCst| ¡}| ¡}t ||f¡ dd¡}t|d|dƒ}|durh| dd¡}t|d|dƒ}|durh|j}||ƒdS)Nú-r Z_handle_)Úget_content_maintypeÚget_content_subtypeÚ UNDERSCOREÚjoinÚreplacer;Ú _writeBody)rr&ÚmainÚsubZspecificr=Zgenericrrrr9Ïs zGenerator._dispatchcCsŠ| ¡D]p\}}|j ||¡}|jjrn|jj}| |jj¡sPtd|›d|›ƒ‚t |  |¡¡rntd|›ƒ‚|  |¡q|  |j ¡dS©Nz folded header does not end with z: z folded header contains newline: ) Ú raw_itemsr ZfoldÚverify_generated_headersrÚendswithr ÚNEWLINE_WITHOUT_FWSPÚsearchÚ removesuffixrr©rr&ÚhÚvZfoldedrrrrr7ãsÿÿ zGenerator._write_headerscCsž| ¡}|durdSt|tƒs.tdt|ƒƒ‚t|jƒr~| d¡}|dur~t|ƒ}|d=|  ||¡| ¡}|d|df|_ |j rt   d|¡}| |¡dS)Nzstring payload expected: %sÚcharsetr3r5ú>From )Ú get_payloadÚ isinstanceÚstrÚ TypeErrorÚtyperÚ_payloadZ get_paramrZ set_payloadr8rÚfcrerFr2)rr&ÚpayloadrQrrrÚ _handle_textös$    ÿ zGenerator._handle_textc Csšg}| ¡}|durg}n(t|tƒr2| |¡dSt|tƒsB|g}|D]6}| ¡}| |¡}|j|d|jd|  |  ¡¡qF|  ¡}|sª|j   |¡}| |¡}| |¡|jduræ|jrÊt d|j¡} n|j} | | ¡| |j¡| d||j¡|r|j | d¡¡|D],} | |jd||j¡|j | ¡q| |jd|d|j¡|jdur–|jr†t d|j¡} n|j} | | ¡dS)NF©r'rrRz--r)rSrTrUrÚlistr,rr(rÚappendr<Z get_boundaryr!rBÚ_make_boundaryZ set_boundaryÚpreamblerrYrFr2rÚpopÚepilogue) rr&ZmsgtextsZsubpartsÚpartrÚgÚboundaryZalltextr`Z body_partrbrrrÚ_handle_multipartsJ           zGenerator._handle_multipartcCs6|j}|jdd|_z| |¡W||_n||_0dS)Nrr)r rrf)rr&ÚprrrÚ_handle_multipart_signedHs  z"Generator._handle_multipart_signedcCsšg}| ¡D]t}| ¡}| |¡}|j|d|jd| ¡}| |j¡}|rv|d|jkrv|  |j  |dd…¡¡q |  |¡q |j   |j  |¡¡dS)NFr\r-) rSr,rr(rr<r/r!r"r^rBrr)rr&ZblocksrcrrdÚtextr0rrrÚ_handle_message_delivery_statusSs    z)Generator._handle_message_delivery_statuscCs^| ¡}| |¡}|j}t|tƒrD|j| d¡d|jd| ¡}n |  |¡}|j   |¡dS)NrFr\) r,rrXrTr]r(rSrr<r rr)rr&rrdrZrrrÚ_handle_messagehs    zGenerator._handle_messagecCsvt tj¡}dt|d}|dur(|S|}d}| dt |¡dtj¡}|  |¡sXqr|dt |ƒ}|d7}q0|S)Nz===============z==rz^--z(--)?$Ú.r6) ÚrandomÚ randrangeÚsysÚmaxsizeÚ_fmtÚ _compile_reÚreÚescapeÚ MULTILINErLrU)ÚclsriÚtokenreÚbZcounterZcrerrrr_s   zGenerator._make_boundarycCs t ||¡Sr)rsÚcompile©rvrÚflagsrrrrr“szGenerator._compile_re)NN)FN)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr(rr,r r2r%r9r7r[rDrfrhrjrkÚ classmethodr_rrrrrrrs. ÿ  1':  rcsPeZdZdZdd„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)rƒrrrrr «szBytesGenerator._encodecCsŒ| ¡D]r\}}|j ||¡}|jjrn|jj ¡}| |¡sPtd|›d|›ƒ‚t  |  |¡¡rntd|›ƒ‚|j   |¡q|  |j ¡dSrG)rHr Z fold_binaryrIrrƒrJr ÚNEWLINE_WITHOUT_FWSP_BYTESrLrMrrrrNrrrr7®s  ÿÿzBytesGenerator._write_headerscs\|jdurdSt|jƒrH|jjdksH|jr:t d|j¡|_| |j¡ntt |ƒ  |¡dS)NZ7bitrR) rXrr Zcte_typerrYrFr2Úsuperrr[)rr&©r)rrr[¿s zBytesGenerator._handle_textcCst | d¡|¡Sr„)rsryrƒrzrrrrrÎszBytesGenerator._compile_re) r|r}r~rrr,r r7r[rDr€rrÚ __classcell__rrr‡rr˜s  rzD[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|dur$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Ú_FMTrq)rrrrÚfmtr rrrrÜs  ÿzDecodedGenerator.__init__c Cs„| ¡D]v}| ¡}|dkr2t|jdd|dq|dkrs0      }<;