*jo S r / SQrSSKJrJr SSKJrJr SSKJ r " S S5 r " S S \ 5 r " S S5 r " S S \5 r g)z-A parser of RFC 5322 and MIME email messages.)ParserHeaderParserBytesParserBytesHeaderParser FeedParserBytesFeedParser )StringIO TextIOWrapper)r r )compat32c : \ rS rSrS\S.S jjrS S jrS S jrSrg) r Npolicyc Xl X l g)a Parser of RFC 5322 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 5322 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 s 3/opt/alt/python313/lib64/python3.13/email/parser.py__init__Parser.__init__ s * c [ U R U R S9nU( a UR 5 UR S5 =n( a+ UR U5 UR S5 =n( a M+ UR 5 $ )a4 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 i )r r r _set_headersonlyreadfeedclose)r fpheadersonly feedparserdatas r parseParser.parse) sj DKK@ '')ggdm#d#OOD! ggdm#d#!!r c 4 U R [ U5 US9$ )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 )r! r r textr s r parsestrParser.parsestr8 s zz(4.kzBBr r )NF) __name__ __module____qualname____firstlineno__r r r! r' __static_attributes__ r r r r s h 0 "Cr r c ( \ rS rSrSS jrSS jrSrg)r C c . [ R XS5 $ NT)r r! r r r s r r! HeaderParser.parseD s ||Dd++r c . [ R XS5 $ r3 )r r' r% s r r' HeaderParser.parsestrG s t400r r/ NT)r* r+ r, r- r! r' r. r/ r r r r C s ,1r r c . \ rS rSrS rSS jrSS jrSrg)r K c $ [ U0 UD6U l g)ax Parser of binary RFC 5322 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 5322 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)r parser)r argskws r r BytesParser.__init__M s d)b)r c [ USSS9n U R R X5 UR 5 $ ! UR 5 f = f)a; Create 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<