import filecmp
a=‘d:\d1‘
b=‘d:\d2‘
dirobj=filecmp.dircmp(a,b)
dirobj.report()
dirobj.report_full_closure()
dirobj.report_partial_closure()
print "left_list"+str(dirobj.left_list)
print "right_list"+str(dirobj.right_list)
print "common"+str(dirobj.common)
print "left_only"+str(dirobj.left_only)
print "right"+str(dirobj.right_only)
print "common_dirs"+str(dirobj.common_dirs)
print "common_files"+str(dirobj.common_files)
print "common_funny"+str(dirobj.common_funny)
print "same_file"+str(dirobj.same_files)
print "diff_files"+str(dirobj.diff_files)
print "funny_files"+str(dirobj.funny_files)
原文地址:https://www.cnblogs.com/mmdln/p/9035989.html
时间: 2024-10-19 03:35:53