§ \�d±ãóª—dZgd¢ZddlmZmZddlmZmZddlm Z Gd„d¦«Z Gd„d e ¦«Z Gd „d ¦«Z Gd „d e ¦«Z dS)z-A parser of RFC 2822 and MIME email messages.)ÚParserÚ HeaderParserÚ BytesParserÚBytesHeaderParserÚ FeedParserÚBytesFeedParseré)ÚStringIOÚ TextIOWrapper)rr)Úcompat32có,—eZdZdedœd„Zdd„Zdd„ZdS) rN©Úpolicycó"—||_||_dS)a…Parser 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)Úselfrrs ú..\python\lib\email\parser.pyÚ__init__zParser.__init__s€ð*ˆŒ ؈Œ ˆ ˆ óFcóê—t|j|j¬¦«}|r| ¦« | d¦«}|sn| |¦«Œ.| ¦«S)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 )rrrÚ_set_headersonlyÚreadÚfeedÚclose)rÚfpÚ headersonlyÚ feedparserÚdatas rÚparsez Parser.parse)s~€õ  ¤ °D´KÐ@Ñ@Ô@ˆ Ø ð *Ø × 'Ò 'Ñ )Ô )Ð )ð "Ø—7’7˜4‘=”=ˆDØð ØØ �OŠO˜DÑ !Ô !Ð !ð  "ð ×ÒÑ!Ô!Ð!rcóJ—| t|¦«|¬¦«S)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)rr ©rÚtextrs rÚparsestrzParser.parsestr;s €ð�zŠz�( 4™.œ.°kˆzÑBÔBÐBr)N©F)Ú__name__Ú __module__Ú __qualname__r rrr#©rrrrsb€€€€€ð¨hðððððð0"ð"ð"ð"ð$CðCðCðCðCðCrrcó—eZdZdd„Zdd„ZdS)rTcó:—t ||d¦«S©NT)rr©rrrs rrzHeaderParser.parseHs€Ý�|Š|˜D " dÑ+Ô+Ð+rcó:—t ||d¦«Sr+)rr#r!s rr#zHeaderParser.parsestrKs€Ý�Š˜t T¨4Ñ0Ô0Ð0rN©T)r%r&r'rr#r(rrrrGs<€€€€€ð,ð,ð,ð,ð1ð1ð1ð1ð1ð1rrcó$—eZdZd„Zdd„Zdd„ZdS)rcó(—t|i|¤Ž|_dS)aÐParser 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)rÚparser)rÚargsÚkws rrzBytesParser.__init__Qs€õ ˜dÐ) bÐ)Ð)ˆŒ ˆ ˆ rFcó¸—t|dd¬¦«} |j ||¦«| ¦«S#| ¦«wxYw)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. ÚasciiÚsurrogateescape)ÚencodingÚerrors)r r1rÚdetachr,s rrzBytesParser.parsecsT€õ˜2¨Ð8IÐ JÑ JÔ Jˆð Ø”;×$Ò$ R¨Ñ5Ô5à �IŠI‰KŒKˆKˆKøˆB�IŠI‰KŒKˆKˆKøøøs ”AÁAcóf—| dd¬¦«}|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. ÚASCIIr6)r8)Údecoder1r#r!s rÚ parsebyteszBytesParser.parsebytesrs2€ð�{Š{˜7Ð+<ˆ{Ñ=Ô=ˆØŒ{×#Ò# D¨+Ñ6Ô6Ð6rNr$)r%r&r'rrr=r(rrrrOsK€€€€€ð*ð*ð*ð$ ð ð ð ð 7ð 7ð 7ð 7ð 7ð 7rrcó—eZdZdd„Zdd„ZdS)rTcó<—t ||d¬¦«S©NTr )rrr,s rrzBytesHeaderParser.parses€Ý× Ò   r°tÐ Ñ<Ô<ÐrGs$ðð 4Ð3ð ,ð ,ð ,€ð'Ð&Ð&Ð&Ð&Ð&Ð&Ð&à8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ø&Ð&Ð&Ð&Ð&Ð&ð3Cð3Cð3Cð3Cð3Cñ3Cô3Cð3Cðn1ð1ð1ð1ð1�6ñ1ô1ð1ð,7ð,7ð,7ð,7ð,7ñ,7ô,7ð,7ð^DðDðDðDðD˜ ñDôDðDðDðDr