Reading and writing Mozilla-mail in python
Fredrik Lundh
fredrik at pythonware.com
Fri Dec 12 02:43:52 EST 2003
Tim Roberts wrote:
> Ralf is correct. The UnixMailbox method uses tell and seek to remember
> file locations and return to them later. Tell and seek on Windows are only
> valid with binary files; the \r\n to \n translation screws it up.
seek/tell works just fine on text files, as long as you only seek to
positions returned by tell (or to the beginning of the file). This is
standard ANSI C behaviour, btw.
(from a quick glance at the mailbox code, I cannot find any case
where the mailbox doesn't use seek/tell in this way, but I might be
missing something...)
</F>
More information about the Python-list
mailing list