| | |
- Parser
-
- HeaderParser
class HeaderParser(Parser) |
| |
A subclass of Parser, this one only meaningfully parses message headers.
This class can be used if all you're interested in is the headers of a
message. While it consumes the message body, it does not parse it, but
simply makes it available as a string payload.
Parsing with this subclass can be considerably faster if all you're
interested in is the message headers. |
| |
Methods defined here:
- _parsebody(self, container, fp)
Data and non-method functions defined here:
- __doc__ = 'A subclass of Parser, this one only meaningfull...n interested in is the message headers.\n '
- __module__ = 'email.Parser'
Methods inherited from Parser:
- __init__(self, _class=<class email.Message.Message>)
- 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.
- _parseheaders(self, container, fp)
- parse(self, fp)
- parsestr(self, text)
|
class Parser |
| |
|
| |
Methods defined here:
- __init__(self, _class=<class email.Message.Message>)
- 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.
- _parsebody(self, container, fp)
- _parseheaders(self, container, fp)
- parse(self, fp)
- parsestr(self, text)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'email.Parser'
| |