/opt/alt/python38/lib64/python3.8/email/__pycache__
NameSizeModeActions
base64mime.cpython-38.opt-1.pyc32500644editdlrm
base64mime.cpython-38.opt-2.pyc14730644editdlrm
base64mime.cpython-38.pyc32500644editdlrm
charset.cpython-38.opt-1.pyc114370644editdlrm
charset.cpython-38.opt-2.pyc51080644editdlrm
charset.cpython-38.pyc114740644editdlrm
contentmanager.cpython-38.opt-1.pyc73760644editdlrm
contentmanager.cpython-38.opt-2.pyc73760644editdlrm
contentmanager.cpython-38.pyc73760644editdlrm
encoders.cpython-38.opt-1.pyc16270644editdlrm
encoders.cpython-38.opt-2.pyc12760644editdlrm
encoders.cpython-38.pyc16270644editdlrm
errors.cpython-38.opt-1.pyc59200644editdlrm
errors.cpython-38.opt-2.pyc44880644editdlrm
errors.cpython-38.pyc59200644editdlrm
feedparser.cpython-38.opt-1.pyc105050644editdlrm
feedparser.cpython-38.opt-2.pyc88420644editdlrm
feedparser.cpython-38.pyc106570644editdlrm
generator.cpython-38.opt-1.pyc125390644editdlrm
generator.cpython-38.opt-2.pyc88400644editdlrm
generator.cpython-38.pyc125390644editdlrm
header.cpython-38.opt-1.pyc164540644editdlrm
header.cpython-38.opt-2.pyc108300644editdlrm
header.cpython-38.pyc164540644editdlrm
headerregistry.cpython-38.opt-1.pyc220070644editdlrm
headerregistry.cpython-38.opt-2.pyc162440644editdlrm
headerregistry.cpython-38.pyc220590644editdlrm
iterators.cpython-38.opt-1.pyc19350644editdlrm
iterators.cpython-38.opt-2.pyc13150644editdlrm
iterators.cpython-38.pyc19350644editdlrm
message.cpython-38.opt-1.pyc378930644editdlrm
message.cpython-38.opt-2.pyc213310644editdlrm
message.cpython-38.pyc378930644editdlrm
parser.cpython-38.opt-1.pyc57370644editdlrm
parser.cpython-38.opt-2.pyc27190644editdlrm
parser.cpython-38.pyc57370644editdlrm
policy.cpython-38.opt-1.pyc96730644editdlrm
policy.cpython-38.opt-2.pyc34580644editdlrm
policy.cpython-38.pyc96730644editdlrm
quoprimime.cpython-38.opt-1.pyc76930644editdlrm
quoprimime.cpython-38.opt-2.pyc42200644editdlrm
quoprimime.cpython-38.pyc76930644editdlrm
utils.cpython-38.opt-1.pyc95570644editdlrm
utils.cpython-38.opt-2.pyc62330644editdlrm
utils.cpython-38.pyc95570644editdlrm
_encoded_words.cpython-38.opt-1.pyc57010644editdlrm
_encoded_words.cpython-38.opt-2.pyc38150644editdlrm
_encoded_words.cpython-38.pyc57010644editdlrm
_header_value_parser.cpython-38.opt-1.pyc799000644editdlrm
_header_value_parser.cpython-38.opt-2.pyc630280644editdlrm
_header_value_parser.cpython-38.pyc799480644editdlrm
_parseaddr.cpython-38.opt-1.pyc124830644editdlrm
_parseaddr.cpython-38.opt-2.pyc95230644editdlrm
_parseaddr.cpython-38.pyc124830644editdlrm
_policybase.cpython-38.opt-1.pyc148250644editdlrm
_policybase.cpython-38.opt-2.pyc59970644editdlrm
_policybase.cpython-38.pyc148250644editdlrm
__init__.cpython-38.opt-1.pyc17060644editdlrm
__init__.cpython-38.opt-2.pyc10810644editdlrm
__init__.cpython-38.pyc17060644editdlrm
Edit: /opt/alt/python38/lib64/python3.8/email/__pycache__/utils.cpython-38.pyc (9557B)
U ,a4@sjdZddddddddd d d d d ddgZddlZddlZddlZddlZddlZddlZddlZ ddl m Z ddl m Z ddl mZddl mZmZmZddlmZdZdZdZdZdZedZedZddZdd Zd7d"dZd#dZd$d%Z d8d'dZ!d9d(dZ"d:d)d Z#d*dZ$d+d Z%d,dZ&d-dZ'd;d.dZ(ed/ej)Z*d0dZ+dzMiscellaneous utilities.collapse_rfc2231_value decode_paramsdecode_rfc2231encode_rfc2231 formataddr formatdateformat_datetime getaddresses make_msgid mktime_tz parseaddr parsedate parsedate_tzparsedate_to_datetimeunquoteN)quote) AddressList)r )r r _parsedate_tz)Charsetz, z 'z[][\\()<>@,:;".]z[\\"]cCs*z|WdStk r$YdSXdS)z8Return True if s contains surrogate-escaped binary data.FTN)encodeUnicodeEncodeError)sr0/opt/alt/python38/lib64/python3.8/email/utils.py_has_surrogates3s rcCs|dd}|ddS)Nutf-8surrogateescapereplace)rdecode)stringZoriginal_bytesrrr _sanitize@s r"rcCs|\}}|d|rz|dWn<tk r`t|trFt|}||}d||fYSXd}t|rtd}t d|}d||||fS|S)aThe inverse of parseaddr(), this takes a 2-tuple of the form (realname, email_address) and returns the string value suitable for an RFC 2822 From, To or Cc header. If the first element of pair is false, then the second element is returned unmodified. The optional charset is the character set that is used to encode realname in case realname is not ASCII safe. Can be an instance of str or a Charset-like object which has a header_encode method. Default is 'utf-8'. asciiz%s <%s>r"z\\\g<0>z %s%s%s <%s>) rr isinstancestrrZ header_encode specialsresearch escapesresub)ZpaircharsetnameZaddressZ encoded_nameZquotesrrrrLs      cCst|}t|}|jS)z7Return a list of (REALNAME, EMAIL) for each fieldvalue.) COMMASPACEjoin _AddressList addresslist)Z fieldvaluesallarrrrns cCsfddddddddg|d |d d d d dddddddddg |dd|d|d|d|d|fS)Nz"%s, %02d %s %04d %02d:%02d:%02d %sZMonZTueZWedZThuZFriZSatZSunZJanZFebZMarZAprZMayZJunZJulZAugZSepZOctZNovZDecrr) timetuplezonerrr_format_timetuple_and_zoneus&  r;FcCsR|dkrt}|s|r,tj|tjj}n tj|}|rH|}d}t||S)aReturns a date string as specified by RFC 2822, e.g.: Fri, 09 Nov 2001 01:08:47 -0000 Optional timeval if given is a floating point time value as accepted by gmtime() and localtime(), otherwise the current time is used. Optional localtime is a flag that when True, interprets timeval, and returns a date relative to the local timezone instead of UTC, properly taking daylight savings time into account. Optional argument usegmt means that the timezone is written out as an ascii string, not numeric one (so "GMT" instead of "+0000"). This is needed for HTTP, and is only used when localtime==False. NF)timedatetimeZ fromtimestamptimezoneutcZutcfromtimestamp astimezoner)timeval localtimeusegmtdtrrrr~s cCsV|}|r2|jdks$|jtjjkr,tdd}n|jdkrBd}n |d}t||S)a$Turn a datetime into a date string as specified in RFC 2822. If usegmt is True, dt must be an aware datetime with an offset of zero. In this case 'GMT' will be rendered instead of the normal +0000 required by RFC2822. This is to support HTTP headers involving date stamps. Nz%usegmt option requires a UTC datetimeZGMTz-0000z%z)r9tzinfor=r>r? ValueErrorstrftimer;)rDrCnowr:rrrrs  cCs^ttd}t}td}|dkr0d}nd|}|dkrHt}d|||||f}|S)a{Returns a string suitable for RFC 2822 compliant Message-ID, e.g: <142480216486.20800.16526388040877946887@nightshade.la.mastaler.com> Optional idstring if given is a string used to strengthen the uniqueness of the message id. Optional domain if given provides the portion of the message id after the '@'. It defaults to the locally defined hostname. d@Nr.z<%d.%d.%d%s@%s>)intr<osgetpidrandomZ getrandbitssocketZgetfqdn)ZidstringZdomainrApidZrandintZmsgidrrrr s  cCsNt|^}}|dkr(tj|ddStj|dddttj|diS)Nr3rEseconds)rr=r> timedelta)dataZdtupletzrrrrs cCst|j}|sdS|dS)z Parse addr into its constituent realname and email address parts. Return a tuple of realname and email address, unless the parse fails, in which case return a 2-tuple of ('', ''). )rrr)r/r0)ZaddrZaddrsrrrr s cCs`t|dkr\|dr<|dr<|ddddddS|dr\|dr\|ddS|S) zRemove quotes from a string.r5r$z\\\z\"<>)len startswithendswithr)r&rrrrs   cCs&|td}t|dkr"dd|fS|S)z#Decode string according to RFC 2231r4N)splitTICKr[)rpartsrrrrs   cCsDtjj|d|pdd}|dkr*|dkr*|S|dkr6d}d|||fS)zEncode string according to RFC 2231. If neither charset nor language is given, then s is returned as-is. If charset is given but not language, the string is encoded using the empty string for language. rr#)ZsafeencodingNz%s'%s'%s)urllibparser)rr+languagerrrrs z&^(?P\w+)\*((?P[0-9]+)\*?)?$c Csl|dd}g}i}|d\}}|||f|r|d\}}|drRd}nd}t|}t|}|r|dd\}}|dk rt|}||g|||fq0||dt |fq0|rh| D]\}}g}d} | |D].\}} }|r t j j| d d } d} || qt t|}| rTt|\} } }||| | d|ffq||d|fq|S) zDecode parameters list according to RFC 2231. params is a sequence of 2-tuples containing (param name, string value). Nr*TFr,numz"%s"zlatin-1)ra)popappendr]rrfc2231_continuationmatchgrouprL setdefaultritemssortrbrc EMPTYSTRINGr.r) ZparamsZ new_paramsZrfc2231_paramsr,valueZencodedZmorfZ continuationsZextendedrr+rdrrrrsD    rus-asciicCsnt|trt|dkrt|S|\}}}|dkr4|}t|d}zt|||WStk rht|YSXdS)Nr6zraw-unicode-escape)r%tupler[rbytesr& LookupError)rperrorsZfallback_charsetr+rdtextZrawbytesrrrr9s  rWc Cs|dkrtjtjjS|jdk r.|S|dd|f}t|}t |}z tj |j d}t||j }Wnt k r|tjt|dd}tjo|jdk}|rtjntj }|tj |dkrt|tj|}n t|}YnX|j|dS)aReturn local time as an aware datetime object. If called without arguments, return current time. Otherwise *dt* argument should be a datetime instance, and it is converted to the local time zone according to the system time zone database. If *dt* is naive (that is, dt.tzinfo is None), it is assumed to be in local time. In this case, a positive or zero value for *isdst* causes localtime to presume initially that summer time (for example, Daylight Saving Time) is or is not (respectively) in effect for the specified time. A negative value for *isdst* causes the localtime() function to attempt to divine whether summer time is in effect for the specified time. NrWrRr3r)rE)r=rHr>r?r@rEr9r<mktimerBrT tm_gmtofftm_zoneAttributeErrorgmtimedaylighttm_isdstaltzonetznamer) rDZisdstZtmrSZlocaltmZdeltarVZdstZgmtoffrrrrBSs$   rB)r)NFF)F)NN)NN)rrq)NrW).__doc____all__rMrer<rOrPr=Z urllib.parserbZemail._parseaddrrrr/r r r rZ email.charsetrr-roZ UEMPTYSTRINGZCRLFr_compiler'r)rr"rrr;rrr rr rrrASCIIrirrrBrrrrsp        "     8