Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2c19aba4
Commit
2c19aba4
authored
Oct 11, 2001
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Describe the HeaderParser class.
parent
6723a82a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Doc/lib/emailparser.tex
Doc/lib/emailparser.tex
+11
-0
No files found.
Doc/lib/emailparser.tex
View file @
2c19aba4
...
...
@@ -24,6 +24,17 @@ no magical connection between the \module{email} package's bundled
parser and the
\class
{
Message
}
class, so your custom parser can create
message object trees in any way it find necessary.
The primary parser class is
\class
{
Parser
}
which parses both the
headers and the payload of the message. In the case of
\mimetype
{
multipart
}
messages, it will recursively parse the body of
the container message. The
\module
{
email.Parser
}
module also provides
a second class, called
\class
{
HeaderParser
}
which can be used if
you're only interested in the headers of the message.
\class
{
HeaderParser
}
can be much faster in this situations, since it
does not attempt to parse the message body, instead setting the
payload to the raw body as a string.
\class
{
HeaderParser
}
has the
same API as the
\class
{
Parser
}
class.
\subsubsection
{
Parser class API
}
\begin{classdesc}
{
Parser
}{
\optional
{_
class
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment