On 04/18/2014 11:57 PM, Sylvain Viart wrote:
>
> Le 18/04/2014 22:30, Mark Sapiro a écrit :
>> should be ---------------
>>
>> clip = MIMEImage(xxx, 'png')
>
> Yeah, I know. But I've embedded the base64 txt data of the clip image in
> the handler.py's code.
> So I don't need to manage an external file for the clip. Could MIMEImage
> handle internal data as well?
>
> It seems extra effort, to mime64 decode and let MIMEImage reencode it,
> right?
You don't have to do that. If xxx is the base64 encoded image data, all
you need is
clip = MIMEImage(xxx, 'png', _encoder=email.encoders.encode_noop)
clip['Content-Transfer-Encoding'] = 'base64'
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-Developers mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives:
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9