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)
| 45 | return BytesParser(*args, **kws).parsebytes(s) |
| 46 | |
| 47 | def 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 | |
| 55 | def message_from_binary_file(fp, *args, **kws): |
| 56 | """Read a binary file and parse its contents into a Message object model. |