[Email-SIG] Fw: MIME objects

Barry Warsaw barry at python.org
Fri Mar 12 23:21:48 CET 2010


My colleague Robert Collins sent me this and asked that I forward it to the
email-sig for discussion.

-Barry

Begin forwarded message:

Date: Sun, 28 Feb 2010 17:20:00 +1100
From: Robert Collins <robertc at robertcollins.net>
To: Barry Warsaw <barry at python.org>
Subject: MIME objects


I wanted to use MIME in selftest machinery, but the stdlib stuff was
uhm, missing.

So I wrote one; its working  well  - perhaps you could include it in the
stdlib?

http://bazaar.launchpad.net/~testtools-dev/testtools/trunk/annotate/head
%3A/testtools/content_type.py
http://bazaar.launchpad.net/~testtools-dev/testtools/trunk/annotate/head
%3A/testtools/content.py

(branch testtools, read the README + pydoc, look at tests.

Features:
 - 2 and 3 clean
 - understands byte serialisation vs string representation
 - streaming interface: does not require or imply buffering
 - common case use is trivial (define one lambda: [value]).


Cheers,
Rob
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/email-sig/attachments/20100312/a8df152a/attachment.pgp>


More information about the Email-SIG mailing list