Re: How to get get_body() to work? (about email)

2023-03-19 Thread Greg Ewing via Python-list
On 20/03/23 7:07 am, Jon Ribbens wrote: Ah, apparently it got removed in Python 3, which is a bit odd as the last I heard it was added in Python 2.2 in order to achieve consistency with other types. As far as I remember, the file type came into existence with type/class unification, and "open"

Re: How to get get_body() to work? (about email)

2023-03-19 Thread Thomas Passin
On 3/18/2023 10:49 PM, Peng Yu wrote: Hi, https://docs.python.org/3/library/email.parser.html It says "For MIME messages, the root object will return True from its is_multipart() method, and the subparts can be accessed via the payload manipulation methods, such as get_body(), iter_parts(), and

How to get get_body() to work? (about email)

2023-03-19 Thread Peng Yu
Hi, https://docs.python.org/3/library/email.parser.html It says "For MIME messages, the root object will return True from its is_multipart() method, and the subparts can be accessed via the payload manipulation methods, such as get_body(), iter_parts(), and walk()." But when I try the following