Created
September 22, 2013 04:07
-
-
Save auxiliary-character/6656590 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import sys | |
firstdata = {} | |
with open(sys.argv[1],"r") as csvfile1: | |
reader1=csv.reader(csvfile1,delimiter=" ") | |
for line in reader1: | |
if line[2] in firstdata: | |
firstdata[line[2]] = firstdata[line[2]]+list([line[4]]) | |
else: | |
firstdata[line[2]] = list([line[4]]) | |
with open(sys.argv[2],"r") as csvfile2: | |
reader2=csv.reader(csvfile2,delimiter=" ") | |
for line in reader2: | |
if line[2] in firstdata: | |
if not line[4] in firstdata[line[2]]: | |
print(line[2],":",line[4],"has changed from",line[2],firstdata[line[2]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment