On Sat, 7 May 2022 at 01:03, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > > Windows also uses <cr><lf> for the EOL marker, but Python's I/O system > condenses that to just <lf> internally (for TEXT mode) -- so using the > length of a string so read to compute a file position may be off-by-one for > each EOL in the string.
So there's no way to reliably read lines in reverse in text mode using seek and read, but the only option is readlines? -- https://mail.python.org/mailman/listinfo/python-list