Error on mimetools?

Arnulf Heimsbakk arnulf at spirea.net
Mon Jul 30 04:42:20 EDT 2001


I'm trying to decode a mime64 message in python with mimetools. I have
tested the "body" with windows winzip. It decodes correctly. When I try to
decode it in python, it do not decode correctly. I get a file with slightly
increased size. The heading of the file seems the same, but when I test this
with a jpg file - the file gets corrupted when decoded with python's
mimetools.

Is there a error in mimetools? Or is my approach entirly incorrect. My code
is below:

out = StringIO()
mimetools.decode(StringIO(self.body), out,  'base64')
return out.getvalue()

I preciate any advise or help I can get.
---
arnulf heimsbakk
system analyst
+47 76 14 45 42

spirea.net - http://spirea.net
andøya rocket range - http://www.rocketrange.no







More information about the Python-list mailing list