Trouble with file.seek/file.tell on Win32?

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Mon Aug 16 13:44:45 CEST 2004


On Mon, 16 Aug 2004 14:12:54 +0300, rumours say that Christos "TZOTZIOY"
Georgiou <tzot at sil-tec.gr> might have written:

[snip correcting myself]

>The string "hello\nthere\n" written to a *text* file, has:
>
>12 bytes on *nix
>14 bytes on Windows/DOS
>12 bytes on OS/X
>

In all cases, if you open the file as text and do a .readline(), you
read a string of length 6; however, only in the Windows/DOS case, f.tell
returns 7, not 6.
-- 
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek



More information about the Python-list mailing list