标签归档:文件比较

比较文件输出不同

Published / by whosb / Leave a Comment

加了个插件,基本ok了

 

#——————————————————————————-

#!/usr/bin/env python

import re
import string

ffrom = open(´aaa.txt´,´r´)
fexp = open(´bbb.txt´,´r´)

fto = open(´file_end´,´a+´)
dict=fexp.read()
#print dict
for into in ffrom:
    #print into
    set1=into.split(´ ´)
    item1=set1[0]
    re1=re.search(item1,dict)
    if re1:
        print item1
    else:

        fto.write(into)
fto.close()
ffrom.close()
fexp.close()