/snap/core22/2411/usr/lib/python3.10/email/__pycache__
NameSizeModeActions
base64mime.cpython-310.pyc32400644editdlrm
charset.cpython-310.pyc115750644editdlrm
contentmanager.cpython-310.pyc73890644editdlrm
encoders.cpython-310.pyc16270644editdlrm
errors.cpython-310.pyc58500644editdlrm
feedparser.cpython-310.pyc105780644editdlrm
generator.cpython-310.pyc129960644editdlrm
header.cpython-310.pyc164620644editdlrm
headerregistry.cpython-310.pyc219050644editdlrm
iterators.cpython-310.pyc19680644editdlrm
message.cpython-310.pyc378040644editdlrm
parser.cpython-310.pyc56730644editdlrm
policy.cpython-310.pyc96530644editdlrm
quoprimime.cpython-310.pyc76230644editdlrm
utils.cpython-310.pyc118660644editdlrm
_encoded_words.cpython-310.pyc57400644editdlrm
_header_value_parser.cpython-310.pyc784540644editdlrm
_parseaddr.cpython-310.pyc125120644editdlrm
_policybase.cpython-310.pyc152400644editdlrm
__init__.cpython-310.pyc15600644editdlrm
Edit: /snap/core22/2411/usr/lib/python3.10/email/__pycache__/parser.cpython-310.pyc (5673B)
o `wi@sxdZgdZddlmZmZddlmZmZddlm Z GdddZ Gdd d e Z Gd d d Z Gd d d e Z dS)z-A parser of RFC 2822 and MIME email messages.)Parser HeaderParser BytesParserBytesHeaderParser FeedParserBytesFeedParser)StringIO TextIOWrapper)rr)compat32c@s0eZdZd edddZd ddZd dd ZdS) rNpolicycCs||_||_dS)aParser of RFC 2822 and MIME email messages. Creates an in-memory object tree representing the email message, which can then be manipulated and turned over to a Generator to return the textual representation of the message. The string must be formatted as a block of RFC 2822 headers and header continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the string or by a blank line. _class is the class to instantiate for new message objects when they must be created. This class must have a constructor that can take zero arguments. Default is Message.Message. The policy keyword specifies a policy object that controls a number of aspects of the parser's operation. The default policy maintains backward compatibility. N)_classr )selfr r r#/usr/lib/python3.10/email/parser.py__init__s zParser.__init__FcCsBt|j|jd}|r| |d}|s |S||q)a\Create a message structure from the data in a file. Reads all the data from the file and returns the root of the message structure. Optional headersonly is a flag specifying whether to stop parsing after reading the headers or not. The default is False, meaning it parses the entire contents of the file. r Ti )rr r _set_headersonlyreadfeedclose)rfp headersonly feedparserdatarrrparse)s  z Parser.parsecCs|jt||dS)a-Create a message structure from a string. Returns the root of the message structure. Optional headersonly is a flag specifying whether to stop parsing after reading the headers or not. The default is False, meaning it parses the entire contents of the file. r)rrrtextrrrrparsestr;szParser.parsestr)NF)__name__ __module__ __qualname__r rrrrrrrrs rc@ eZdZdddZdddZdS)rTcCt||dSNT)rrrrrrrrrHzHeaderParser.parsecCr$r%)rrrrrrrKr'zHeaderParser.parsestrNT)r r!r"rrrrrrrG rc@s(eZdZddZd ddZd ddZdS) rcOst|i||_dS)aParser of binary RFC 2822 and MIME email messages. Creates an in-memory object tree representing the email message, which can then be manipulated and turned over to a Generator to return the textual representation of the message. The input must be formatted as a block of RFC 2822 headers and header continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the input or by a blank line. _class is the class to instantiate for new message objects when they must be created. This class must have a constructor that can take zero arguments. Default is Message.Message. N)rparser)rargskwrrrrQszBytesParser.__init__FcCs2t|ddd}z |j||W|S|w)acCreate a message structure from the data in a binary file. Reads all the data from the file and returns the root of the message structure. Optional headersonly is a flag specifying whether to stop parsing after reading the headers or not. The default is False, meaning it parses the entire contents of the file. asciisurrogateescape)encodingerrors)r r*rdetachr&rrrrcszBytesParser.parsecCs|jddd}|j||S)a2Create a message structure from a byte string. Returns the root of the message structure. Optional headersonly is a flag specifying whether to stop parsing after reading the headers or not. The default is False, meaning it parses the entire contents of the file. ASCIIr.)r0)decoder*rrrrr parsebytesrszBytesParser.parsebytesNr)r r!r"rrr4rrrrrOs rc@r#)rTcCtj||ddSNTr)rrr&rrrrzBytesHeaderParser.parsecCr5r6)rr4rrrrr4r7zBytesHeaderParser.parsebytesNr()r r!r"rr4rrrrr~r)rN)__doc____all__iorr email.feedparserrremail._policybaser rrrrrrrrs 7/