I am trying to write a program that will open files, read the contents and compare them to other files opened. I need to show if they are Not close enough alike, Similar, or exact copies of each other. I am trying to use the filecmp module, but it's not working for me. Here's what I have so far:
import filecmp
#Opens selected files
file1 = open('file1.txt')
file2 = open('file2.txt')
#Compares different files
filecmp.cmp('file1','file2', shallow=False)
#Closes Files
filecmp.clear_cache()
close.file1
close.file2
Any suggestions?