En Thu, 21 May 2009 10:34:09 -0300, <s...@pobox.com> escribió:
I want to modify my script to automatically zip or gzip files which
exceed
some size threshold. Doing the zip/gzip dance is no problem. I'm
concerned
about how to specify that properly with the email package. For example,
consider a large CSV file. I figure out the MIME type is text/csv. Now
suppose I gzip the file before attaching it. How would this code change
to
specify the compression where "path" is now compressed?
HTTP uses the Content-Coding: gzip header field, but I think there is no
equivalent in MIME :(
I'm afraid you'll have to declare the attachment as a gzipped file, and
let the user manually unzip and handle the contained csv file.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list