Untitled
Anonymous
python
06/19/2023 9:46 AM
484 B
11
Indexable
#!/usr/bin/python3
import io
import time
with open('log.txt', 'r') as f:
f.seek(0, io.SEEK_END)
eof = f.tell()
print('start sleep')
time.sleep(10)
print('end sleep')
#f.seek(0, io.SEEK_END)
#eof = f.tell()
f.seek(0, io.SEEK_SET)
i = 0
while f.tell() != eof:
print(f'{f.readline()}', end='')
i += 1
Editor is loading...