PyDocs

Nav

Internet Data Handling

EmailPolicy.header_source_parse

  • EmailPolicy.header_source_parse(sourcelines)
Given a list of linesep terminated strings constituting the lines of
a single header, return the (name, value) tuple that should be stored
in the model.  The input lines should retain their terminating linesep
characters.  The lines passed in by the email package may contain
surrogateescaped binary data.
The name is parsed as everything up to the ':' and returned unmodified.
The value is determined by stripping leading whitespace off the
remainder of the first line joined with all subsequent lines, and
stripping any trailing carriage return or linefeed characters.  (This
is the same as Compat32).
0 Examples
No examples for email.policy/EmailPolicy.header_source_parse.
See Also
No see-alsos for email.policy/EmailPolicy.header_source_parse
0 Notes
No notes for EmailPolicy.header_source_parse