Issue
I'm trying to read a file in Python, close it and then read it again from the point where I stopped reading it.
Real problem: I'm trying to process a Tomcat log file which is updated every hour. So when I read it from Python end, I get duplicate (old) logs as well as the new ones.
Edit: Is there an efficient way to read the new logs from the common file?
Solution
See where you are: offset = f.tell()
Go back to where you were: f.seek(offset)
Answered By - Amadan