File "/.../compare_system.py", line 18, in
old = t1.readlines()
File "....Python.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
import csv
import os
filePath = '/...ana/'
name = os.listdir(filePath)
print(name)
dirr = []
for i in name[1:]:
dirr.append(filePath+i)
print(dirr)
for i in dirr:
a=os.listdir(i)
if len(a)>=2:
true = i+'/'+a[0]
truee = i+'/'+a[1]
with open(true,"r")as t1, open(truee,"r")as t2:
old = t1.readlines()
new = t2.readlines()
con = []
for line in new:
if line not in old:
con.append([i,line])
print(con)
else:
print(f"{i} file has less than 2 files")
exit()