email library, get_payload() bug?
aspineux at gmail.com
Sat Feb 19 06:22:27 CET 2011
On 18 fév, 14:41, peterob <peterob... at gmail.com> wrote:
> I want to get the raw format of email body. the code Im using is
> for part in email.walk():
> if part.get_content_maintype() == 'multipart':
> if part.get_content_type() == 'text/plain':
> # print part.get_content_type()
> print part.get_payload(None,True)
> The problem is, that code adds one more '\n' at the and of the output
> printed by get_payload(). Is that bug?
No sure to undeerstand, but print add one '\n' by itself
with a "," at the end to tell print not to add a "\n"
hope this help
More information about the Python-list