I am making a program that reads through a log file that is stored locally on the C drive. This log file is constantly being updated and my program only prints the new lines of text in the log, not the previously stored lines. I need the same function that prints lines in the console to return the line itself. The only way I can see of doing that is to put return in the for loop but that is not possible as it ends the function.
I need this function that read lines to return the line also because the returned line will be sent to another function that interprets the line to recognize certain data in it.
How would I loop a return in a function or pass data from a function onto another function?
I am on Windows 8.1 Python v2.7.9