I'm trying to get python to tail a logfile e.g. syslog.
I've tried opening the file in read mode, but it never realises if another process writes to the file. Using a popen, and actual 'tail -f' together with registering the popened process to select, python is able to read any writes. And using the python systemd module, i can get systemd to respond with the contents, but I'd like to know if there are other ways instead of these methods and, why the opening a file for reading and constantly trying to read 1024 bytes, doesn't work.