MimeWriter and PDFs

Brandon berklee at hotmail.com
Fri May 2 15:29:50 EDT 2003


"Steve Holden" <sholden at holdenweb.com> wrote in message news:<TNtsa.8032$3n5.5922 at news2.central.cox.net>...

> Please note that the email module is to be preferred for this and similar
> applications. Being of more recent design it has a rather more pleasant
> interface. Since it's being used in MailMan it's presumably also handled a
> *lot* of messages without falling over too badly, it can contruct messages
> by parsing as well as using constructive methods, etc., etc., etc.
> 
> More of that later, however. For now, you've got code that uses MimeWriter.
> OK.

Thanks for the heads-up. I'm still very new to the language, and the
web examples (along with the ones in the book) are what I thought were
'standard'. I didn't know about that email library module. I'll try a
re-write.

> I would recommend you open that file in binary mode ('rb'). This may well be
> responsible for your problem. In Windows systems you're just thrown away all
> the carriage returns in your file. If those carriage returns aren't really
> ASCII characters, but instead a part of carefully-crafted binary data,
> whoops.

It turns out that was the problem. I had some issue before where I was
reading binary, but the PDF was showing up in-line as the encoded
text. My tooling around caught up with me.

> The SMTP side seems sane enough to require no further comment.

Quick side question - I know a while ago my boss and I were having
trouble because our SMTP server required authentication. Does Python's
most recent version yet accomodate for this, or does the module need
to be modified?


> 
> Python Web Programming was an attempt to put slightly better examples to fit
> with the documentation for what is actually a lot of very funky stuff. The
> fact that we now have even better stuff doesn't make the old stuff less
> funky, just not quite so cool ...
> 
> regards

I have the book sitting right next to me, and am enjoying it very
much. It makes so much sense that when I sit down at the IDE after
reading some, I feel like I should know all the syntax already. :)

Great book, though.... and probably one of the most useful in
converting me from primarily-VB to primarily-Python.

Thanks for the help, everyone.




More information about the Python-list mailing list