Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 353 Bytes
import os
import time
import re
import settings
RECSMATCH=0
#RECSREAD=0
pattern = re.compile(settings.TARGET_USERNAME)
with open(settings.BIG_FILE, "r") as fh_in:
for line in fh_in:
#RECSREAD += 1
if pattern.search(line):
RECSMATCH += 1
#print(RECSREAD,RECSMATCH)
print(RECSMATCH)