I'm trying to print diff.txt that contains the differences between the 2 log files I have. I want it to print the diff.txt in the current directory, but I get nothing.
def difference(dirList1, dirList2):
difFile = list(set(dirList1).difference(set(dirList2)))
writeDif = open( 'diff.txt', 'w' )
writeDif.write( 'Yadda yadda, intro intro' )
pprint( difFile, writeDif )
writeDif.close()
difference()
dirList1 and 2 are already set via a path definition of:
path1 = "E:\Music\dirList1.txt"
dirList1 = os.path.basename(path1)
Any suggestions?