first
This commit is contained in:
11
rich_parser.py
Normal file
11
rich_parser.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def search_file(file_path, word):
|
||||
with open(file_path, 'r') as file:
|
||||
for line in reversed(file.readlines()):
|
||||
if word in line:
|
||||
return line
|
||||
|
||||
speed = search_file('E:/Projects/python/ffmpeg_work_folder/testoutprogress.txt', 'speed=')
|
||||
frame = search_file('E:/Projects/python/ffmpeg_work_folder/testoutprogress.txt', 'frame=')
|
||||
|
||||
print(speed)
|
||||
print(frame)
|
||||
Reference in New Issue
Block a user