Package email :: Module parser :: Class HeaderParser
[hide private]
[frames] | no frames]

_ClassType HeaderParser

Parser --+
         |
        HeaderParser

Instance Methods [hide private]
 
parse(self, fp, headersonly=True)
Create a message structure from the data in a file.
 
parsestr(self, text, headersonly=True)
Create a message structure from a string.

Inherited from Parser: __init__

Method Details [hide private]

parse(self, fp, headersonly=True)

 

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.

Overrides: Parser.parse
(inherited documentation)

parsestr(self, text, headersonly=True)

 

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.

Overrides: Parser.parsestr
(inherited documentation)