Spade
Mini Shell
| Directory:~$ /lib/python2.7/site-packages/future/backports/email/ |
| [Home] [System Details] [Kill Me] |
�
,�]c@`s�dZddlmZddlmZddlmZddddgZdd lZdd
lmZm Z ddl
mZmZddl
mZdd
lmZdefd��YZdefd��YZdefd��YZdefd��YZd S(u-A
parser of RFC 2822 and MIME email
messages.i(tunicode_literals(tdivision(tabsolute_importuParseruHeaderParseruBytesParseruBytesHeaderParserN(tStringIOt
TextIOWrapper(t
FeedParsertBytesFeedParser(tMessage(tcompat32tParsercB`s,eZed�Zed�Zed�ZRS(cK`s<d|kr
|d}|d=nt}||_||_dS(u�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.
The policy keyword specifies a policy object that controls a number
of
aspects of the parser's operation. The default policy
maintains
backward compatibility.
upolicyN(Rt_classtpolicy(tselfR
t_3to2kwargsR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyt__init__s
cC`sht|jd|j�}|r+|j�nx0tr]|jd�}|sMPn|j|�q.W|j�S(u\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.
Ri (RR
Rt_set_headersonlytTruetreadtfeedtclose(Rtfptheadersonlyt
feedparsertdata((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pytparse/s
cC`s|jt|�d|�S(u-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(RttextR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pytparsestrAs(t__name__t
__module__RRtFalseRR(((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyR stHeaderParsercB`s
eZed�Zed�ZRS(cC`stj||t�S(N(R RR(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRNscC`stj||t�S(N(R RR(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRQs(RRRRR(((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRMstBytesParsercB`s)eZd�Zed�Zed�ZRS(cO`st||�|_dS(u�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 preceeded 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 tparser(Rtargstkw((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRWscC`s<t|dddd�}|�|jj||�SWdQXdS(ucCreate
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.
tencodinguasciiterrorsusurrogateescapeN(RR
R(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRiscC`s(|jddd�}|jj||�S(u2Create
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.
uASCIIR$usurrogateescape(tdecodeR
R(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyt
parsebytesvs(RRRRRR&(((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyRUs
tBytesHeaderParsercB`s
eZed�Zed�ZRS(cC`stj||dt�S(NR(RRR(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyR�scC`stj||dt�S(NR(RR&R(RRR((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyR&�s(RRRRR&(((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyR'�s(t__doc__t
__future__RRRt__all__twarningstioRRt!future.backports.email.feedparserRRtfuture.backports.email.messageRt"future.backports.email._policybaseRtobjectR RRR'(((sA/usr/lib/python2.7/site-packages/future/backports/email/parser.pyt<module>s9-