MCPcopy Index your code
hub / github.com/python/cpython / message_from_file

Function message_from_file

Lib/email/__init__.py:47–53  ·  view source on GitHub ↗

Read a file and parse its contents into a Message object model. Optional _class and strict are passed to the Parser constructor.

(fp, *args, **kws)

Source from the content-addressed store, hash-verified

45 return BytesParser(*args, **kws).parsebytes(s)
46
47def message_from_file(fp, *args, **kws):
48 """Read a file and parse its contents into a Message object model.
49
50 Optional _class and strict are passed to the Parser constructor.
51 """
52 from email.parser import Parser
53 return Parser(*args, **kws).parse(fp)
54
55def message_from_binary_file(fp, *args, **kws):
56 """Read a binary file and parse its contents into a Message object model.

Callers

nothing calls this directly

Calls 2

ParserClass · 0.90
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…