|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21571/root/usr/lib64/python2.4/email/ |
Upload File : |
mō
=5Dc @ sc d Z d k Z d k l Z d k l Z d k l Z d f d YZ d e f d YZ d S( s- A parser of RFC 2822 and MIME email messages.N( s StringIO( s
FeedParser( s Messaget Parserc B s) t Z d Z e d Z e d Z RS( Nc O s t | d j o/ d | j o t d n | d | d <n t | d j o/ d | j o t d n | d | d <n t | d j o t d n d | j o | d | _ | d =n
t | _ d | j o t i d t d | d =n | o t d
n d S( sĖ 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 preceeded 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.
i t _classs( Multiple values for keyword arg '_class'i i t stricts( Multiple values for keyword arg 'strict's Too many argumentss- 'strict' argument is deprecated (and ignored)s Unexpected keyword argumentsN(
t lent argst kwst TypeErrort selfR t Messaget warningst warnt DeprecationWarning( R R R ( ( t$ /usr/lib64/python2.4/email/Parser.pyt __init__ s*
c C se t | i } | o | i n x4 t o, | i d } | p Pn | i
| q' W| i S( s\ 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.
i N( t
FeedParserR R t
feedparsert headersonlyt _set_headersonlyt Truet fpt readt datat feedt close( R R R R R ( ( R t parse5 s c C s | i t | d | S( s- 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 N( R R t StringIOt textR ( R R R ( ( R t parsestrG s ( t __name__t
__module__R
t FalseR R ( ( ( R R s &t HeaderParserc B s t Z e d Z e d Z RS( Nc C s t i | | t S( N( R R R R R ( R R R ( ( R R T s c C s t i | | t S( N( R R R R R ( R R R ( ( R R W s ( R R R R R ( ( ( R R S s (
t __doc__R t cStringIOR t email.FeedParserR t
email.MessageR R R ( R R R R R R ( ( R t ? s
E