Cezary Wagner <cezary.wag...@gmail.com> added the comment:
Really really strange but it works :) "an opaque number when in text mode." -> so it is Windows C libraries. I use it in production code too so my heart speed up when I see number but it works as you said. It looks complicated/slow if I have to open file in binary mode. I can do it but it is ugly workaround to get position? It looks some decide that speed is better than functionality so binary files is only option to get for example estimate progress in some speedometer. I think that should some function to convert this .tell() for text files into real .tell(). with open('../s01_parser_eval/data/out-6976.txt') as pgn: pgn.seek(1008915299) t = None while True: if t: pgn.seek(t) pgn.readline() pt = t t = pgn.tell() if pt: if pt > t: print('Strange %s!', t) pgn.seek(t) print(pgn.tell()) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39962> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com