Mailbox, tell and read
Paul Prescod
Paul.Prescod at p98.f112.n480.z2.fidonet.org
Thu Jul 1 02:12:18 EDT 1999
From: Paul Prescod <paul at prescod.net>
Gordon McMillan wrote:
>
> How 'bout opening in binary, and munging line endings yourself just
> before returning the message?
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?
> If you can't use tell(), you can't trust seek(), either.
Good point.
--
Paul Prescod - ISOGEN Consulting Engineer speaking for only himself
http://itrc.uwaterloo.ca/~papresco
"I don't want you to describe to me -- not ever -- what you were doing
to that poor boy to make him sound like that; but if you ever do it
again, please cover his mouth with your hand," Grandmother said.
-- John Irving, "A Prayer for Owen Meany"
More information about the Python-list
mailing list