[Email-SIG] Parsing email with large attachment
Barry Warsaw
barry at python.org
Tue Sep 4 13:51:53 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sep 4, 2007, at 12:27 AM, Vijay Rao wrote:
> The only way to fix this seems to be rewriting the parser to not load
> the attachment into memory at all and maybe write it to a file , pass
> the file pointer to set_payload and decode the attachment in small
> chunks in get_payload instead of loading the entire file.
> Subclass message to accept a file pointer in set_payload, etc...
We've long talked about adding an API to allow the parser to store
attachment data externally instead of in memory. We've never gotten
past the "yes, that would be a good idea" stage though. Care to
propose an API and work on an implementation?
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQCVAwUBRt1G2XEjvBPtnXfVAQJ6nwQAqR8XlNL9cg2Q+2sgGv740PkTtBNPenqQ
IVIu2MGHJYibvM7LrHF24MMEnXi80t1+JUQff/HhAn9jTjF2N02jtS+q/nigSyY/
08+YNmud9vgaOrGOOd1HAYIkYiCiv2YBUbhetJnsoV9dWS24Psp445qJl6/NvtdD
fh2Ipz9cfys=
=MIrO
-----END PGP SIGNATURE-----
More information about the Email-SIG
mailing list