Skip to content

Instantly share code, notes, and snippets.

View itzilly's full-sized avatar

illyum itzilly

View GitHub Profile
@itzilly
itzilly / tailer.py
Last active August 27, 2023 03:08
Python File Tailer
def on_file_emit(line):
# Do stuff with your line here: (line.strip())
print(line)
def main(path):
with open(log, 'r') as file:
file.seek(0, 2)
while True:
line = file.readline()