The filecmp module from the standard library contains a the dircmp class which has two similar sounding attribues:
common_funny:
Names in both a and b, such that the type differs between the
directories, or names for which os.stat() reports an error.
funny_files:
Files which are in both a and b, but could not be compared.
What would cause files or directories to appear in common_funny?
What would cause files or directories to appear in funny_files?
Use the source Luke.
common_funnygets appended to if the types of the two files don’t match (eg one is a file, the other a directory), or it isn’t a recognised type, or the os.stat blew up. These are returned in the first pass when just looking at file names and types.funny_filesis made from files whichdircmpthought it could compare, but couldn’t read for some reason – some kind of os.error on reading maybe (permission denied for instance). These are returned in the second pass when actually trying to see the differences in the files (when actually runningfilecmp.cmp).I didn’t know about the filecmp module – thanks for bringing it to my attention!