MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / parsestr

Method parsestr

tools/python-3.11.9-amd64/Lib/email/parser.py:59–67  ·  view source on GitHub ↗

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.

(self, text, headersonly=False)

Source from the content-addressed store, hash-verified

57 return feedparser.close()
58
59 def parsestr(self, text, headersonly=False):
60 """Create a message structure from a string.
61
62 Returns the root of the message structure. Optional headersonly is a
63 flag specifying whether to stop parsing after reading the headers or
64 not. The default is False, meaning it parses the entire contents of
65 the file.
66 """
67 return self.parse(StringIO(text), headersonly=headersonly)
68
69
70class HeaderParser(Parser):

Callers 8

message_from_stringFunction · 0.45
parsestrMethod · 0.45
parsebytesMethod · 0.45
parse_headersFunction · 0.45
_parsed_pkg_infoMethod · 0.45
get_metadataMethod · 0.45
_parsed_pkg_infoMethod · 0.45
wheel_metadataFunction · 0.45

Calls 2

parseMethod · 0.95
StringIOClass · 0.90

Tested by

no test coverage detected