/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__/_encoded_words.cpython-39.pyc (5707B)
a ´i]!ã@sædZddlZddlZddlZddlZddlmZmZddlm Z gd¢Z e  e  d¡j dd„¡Zd d „ZGd d „d eƒZeƒZd eedƒ<dd„Zdd„Zdd„Zdd„Zdd„ZeedœZdd„ZeedœZeedœZd dd„ZdS)!z¦ Routines for manipulating RFC2047 encoded words. This is currently a package-private API, but will be considered for promotion to a public API if there is demand. éN)Ú ascii_lettersÚdigits)Úerrors)Údecode_qÚencode_qÚdecode_bÚencode_bÚlen_qÚlen_bÚdecodeÚencodes=([a-fA-F0-9]{2})cCst | d¡ ¡¡S)Né)ÚbytesÚfromhexÚgroupr )Úm©rú,/usr/lib64/python3.9/email/_encoded_words.pyÚAórcCs| dd¡}t|ƒgfS)Nó_ó )ÚreplaceÚ_q_byte_subber)ÚencodedrrrrCs rc@s,eZdZde d¡e d¡Zdd„ZdS)Ú _QByteMaps-!*+/ÚasciicCs.||jvrt|ƒ||<nd |¡||<||S)Nz={:02X})ÚsafeÚchrÚformat)ÚselfÚkeyrrrÚ __missing__Ms z_QByteMap.__missing__N)Ú__name__Ú __module__Ú __qualname__rr rrr"rrrrrIsrÚ_ú cCsd dd„|Dƒ¡S)NÚcss|]}t|VqdS©N)Ú _q_byte_map©Ú.0ÚxrrrÚ Zrzencode_q..)Újoin©ÚbstringrrrrYsrcCstdd„|DƒƒS)Ncss|]}tt|ƒVqdSr))Úlenr*r+rrrr.]rzlen_q..)Úsumr0rrrr \sr cCsðt|ƒd}|r ddd|…nd}z&tj||dd�|rDt ¡gngfWStjyêztj|dd�t ¡gfWYStjyäz,tj|ddd�t ¡t ¡gfWYYStjyÞ|t ¡gfYYYS0Yn0Yn0dS)Nés===rT)ÚvalidateFs==) r2Úbase64Z b64decoderZInvalidBase64PaddingDefectÚbinasciiÚErrorZInvalidBase64CharactersDefectZInvalidBase64LengthDefect)rZpad_errZmissing_paddingrrrrds( þ þ ÿþrcCst |¡ d¡S)Nr)r6Z b64encoder r0rrrrŠsrcCs&tt|ƒdƒ\}}|d|r dndS)Nér4r)Údivmodr2)r1Z groups_of_3Zleftoverrrrr �sr )ÚqÚbc CsÞ| d¡\}}}}}| d¡\}}}| ¡}| dd¡}t||ƒ\}}z| |¡}WnztyŒ| t  d|›d�¡¡| |d¡}YnFt t fyÐ| dd¡}| ¡dkrÌ| t  d|›d �¡¡Yn0||||fS) a�Decode encoded word and return (string, charset, lang, defects) tuple. An RFC 2047/2243 encoded word has the form: =?charset*lang?cte?encoded_string?= where '*lang' may be omitted but the other parts may not be. This function expects exactly such a string (that is, it does not check the syntax and may raise errors if the string is not well formed), and returns the encoded_string decoded first from its Content Transfer Encoding and then from the resulting bytes into unicode using the specified charset. If the cte-decoded string does not successfully decode using the specified character set, a defect is added to the defects list and the unknown octets are replaced by the unicode 'unknown' character \uFDFF. The specified charset and language are returned. The default for language, which is rarely if ever encountered, is the empty string. ú?Ú*rÚsurrogateescapez0Encoded word contains bytes not decodable using z charsetú unknown-8bitzUnknown charset z* in encoded word; decoded as unknown bytes) ÚsplitÚ partitionÚlowerr Ú _cte_decodersr ÚUnicodeDecodeErrorÚappendrZUndecodableBytesDefectÚ LookupErrorÚUnicodeEncodeErrorZ CharsetError) Zewr&ÚcharsetZcteZ cte_stringÚlangr1ZdefectsÚstringrrrr ˜s"   ÿ   r úutf-8r(cCs||dkr| dd¡}n | |¡}|durTtd|ƒ}td|ƒ}||dkrPdnd}t||ƒ}|rld|}d  ||||¡S) aEncode string using the CTE encoding that produces the shorter result. Produces an RFC 2047/2243 encoded word of the form: =?charset*lang?cte?encoded_string?= where '*lang' is omitted unless the 'lang' parameter is given a value. Optional argument charset (defaults to utf-8) specifies the charset to use to encode the string to binary before CTE encoding it. Optional argument 'encoding' is the cte specifier for the encoding that should be used ('q' or 'b'); if it is None (the default) the encoding which produces the shortest encoded sequence is used, except that 'q' is preferred if it is up to five characters longer. Optional argument 'lang' (default '') gives the RFC 2243 language string to specify in the encoded word. r@rr?Nr;r<ér>z=?{}{}?{}?{}?=)r Ú_cte_encode_lengthÚ _cte_encodersr)rKrIÚencodingrJr1ZqlenZblenrrrrr Ìs    r )rLNr()Ú__doc__Úrer6r7Ú functoolsrKrrZemailrÚ__all__ÚpartialÚcompileÚsubrrÚdictrr*Úordrr rrr rDr rOrNr rrrrÚs<) ÿ  &þ+þþ