Mailbox, tell and read

Aahz Maruch aahz at netcom.com
Thu Jul 1 12:19:58 EDT 1999


In article <377B7742.F39CB0A4 at prescod.net>,
Paul Prescod  <paul at prescod.net> wrote:
>
>First, are there platforms other than DOS/Windows/Win32 where there is a
>difference between text and binary mode? I didn't want to munge things
>myself because I'm not sure if what is the "right" munge on the Mac, for
>instance. Can I just do a search and replace for CR/LF -> CR on all
>platforms, all of the time?

I ran into this last year (while I was still a Perl heretic).
Unfortunately, you *have* to use binary mode in opening a mail file
because one of the legal MIME attachment types is non-encoded binary --
and that means you can't just blindly do a search/replace, either.
Never did come to a completely satisfactory answer.  :-(

I think CR will break on Unix, but I'm not sure.
--
                      --- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6       <*>      http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het




More information about the Python-list mailing list