[Python] Continuously read the last line of log file in python

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024.

  1. Stack

    Stack Membro Participativo

    I have a file in which new lines are continuously written.

    In python, I would like to continuously read the last line of this file, so that I can process the line.

    I know there is the readlines() function but this is "static". If new lines are added after I called readlines() these new lines will not be read.

    How can I do this in python ? Thanks

    Continue reading...

Compartilhe esta Página