[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
lib64
/
python3.6
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 __pycache__
SET
[ DEL ]
📁 asyncio
SET
[ DEL ]
📁 collections
SET
[ DEL ]
📁 concurrent
SET
[ DEL ]
📁 config-3.6m-x86_64-linux-gnu
SET
[ DEL ]
📁 ctypes
SET
[ DEL ]
📁 curses
SET
[ DEL ]
📁 dbm
SET
[ DEL ]
📁 distutils
SET
[ DEL ]
📁 email
SET
[ DEL ]
📁 encodings
SET
[ DEL ]
📁 ensurepip
SET
[ DEL ]
📁 html
SET
[ DEL ]
📁 http
SET
[ DEL ]
📁 importlib
SET
[ DEL ]
📁 json
SET
[ DEL ]
📁 lib-dynload
SET
[ DEL ]
📁 lib2to3
SET
[ DEL ]
📁 logging
SET
[ DEL ]
📁 multiprocessing
SET
[ DEL ]
📁 pydoc_data
SET
[ DEL ]
📁 site-packages
SET
[ DEL ]
📁 sqlite3
SET
[ DEL ]
📁 test
SET
[ DEL ]
📁 unittest
SET
[ DEL ]
📁 urllib
SET
[ DEL ]
📁 venv
SET
[ DEL ]
📁 wsgiref
SET
[ DEL ]
📁 xml
SET
[ DEL ]
📁 xmlrpc
SET
[ DEL ]
📄 __future__.py
4,841 B
SET
[ EDIT ]
|
[ DEL ]
📄 __phello__.foo.py
64 B
SET
[ EDIT ]
|
[ DEL ]
📄 _bootlocale.py
1,301 B
SET
[ EDIT ]
|
[ DEL ]
📄 _collections_abc.py
26,392 B
SET
[ EDIT ]
|
[ DEL ]
📄 _compat_pickle.py
8,749 B
SET
[ EDIT ]
|
[ DEL ]
📄 _compression.py
5,340 B
SET
[ EDIT ]
|
[ DEL ]
📄 _dummy_thread.py
5,118 B
SET
[ EDIT ]
|
[ DEL ]
📄 _markupbase.py
14,598 B
SET
[ EDIT ]
|
[ DEL ]
📄 _osx_support.py
19,138 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pydecimal.py
230,228 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pyio.py
88,097 B
SET
[ EDIT ]
|
[ DEL ]
📄 _sitebuiltins.py
3,115 B
SET
[ EDIT ]
|
[ DEL ]
📄 _strptime.py
24,747 B
SET
[ EDIT ]
|
[ DEL ]
📄 _sysconfigdata_dm_linux_x86_64-linux-gnu.py
30,191 B
SET
[ EDIT ]
|
[ DEL ]
📄 _sysconfigdata_m_linux_x86_64-linux-gnu.py
30,367 B
SET
[ EDIT ]
|
[ DEL ]
📄 _threading_local.py
7,214 B
SET
[ EDIT ]
|
[ DEL ]
📄 _weakrefset.py
5,705 B
SET
[ EDIT ]
|
[ DEL ]
📄 abc.py
8,727 B
SET
[ EDIT ]
|
[ DEL ]
📄 aifc.py
32,454 B
SET
[ EDIT ]
|
[ DEL ]
📄 antigravity.py
477 B
SET
[ EDIT ]
|
[ DEL ]
📄 argparse.py
90,372 B
SET
[ EDIT ]
|
[ DEL ]
📄 ast.py
12,166 B
SET
[ EDIT ]
|
[ DEL ]
📄 asynchat.py
11,328 B
SET
[ EDIT ]
|
[ DEL ]
📄 asyncore.py
20,159 B
SET
[ EDIT ]
|
[ DEL ]
📄 base64.py
20,388 B
SET
[ EDIT ]
|
[ DEL ]
📄 bdb.py
23,556 B
SET
[ EDIT ]
|
[ DEL ]
📄 binhex.py
13,954 B
SET
[ EDIT ]
|
[ DEL ]
📄 bisect.py
2,595 B
SET
[ EDIT ]
|
[ DEL ]
📄 bz2.py
12,478 B
SET
[ EDIT ]
|
[ DEL ]
📄 cProfile.py
5,380 B
SET
[ EDIT ]
|
[ DEL ]
📄 calendar.py
23,213 B
SET
[ EDIT ]
|
[ DEL ]
📄 cgi.py
37,219 B
SET
[ EDIT ]
|
[ DEL ]
📄 cgitb.py
12,018 B
SET
[ EDIT ]
|
[ DEL ]
📄 chunk.py
5,425 B
SET
[ EDIT ]
|
[ DEL ]
📄 cmd.py
14,860 B
SET
[ EDIT ]
|
[ DEL ]
📄 code.py
10,614 B
SET
[ EDIT ]
|
[ DEL ]
📄 codecs.py
36,276 B
SET
[ EDIT ]
|
[ DEL ]
📄 codeop.py
5,994 B
SET
[ EDIT ]
|
[ DEL ]
📄 colorsys.py
4,064 B
SET
[ EDIT ]
|
[ DEL ]
📄 compileall.py
12,125 B
SET
[ EDIT ]
|
[ DEL ]
📄 configparser.py
53,592 B
SET
[ EDIT ]
|
[ DEL ]
📄 contextlib.py
13,162 B
SET
[ EDIT ]
|
[ DEL ]
📄 copy.py
8,815 B
SET
[ EDIT ]
|
[ DEL ]
📄 copyreg.py
7,007 B
SET
[ EDIT ]
|
[ DEL ]
📄 crypt.py
1,864 B
SET
[ EDIT ]
|
[ DEL ]
📄 csv.py
16,180 B
SET
[ EDIT ]
|
[ DEL ]
📄 datetime.py
82,034 B
SET
[ EDIT ]
|
[ DEL ]
📄 decimal.py
320 B
SET
[ EDIT ]
|
[ DEL ]
📄 difflib.py
84,377 B
SET
[ EDIT ]
|
[ DEL ]
📄 dis.py
18,132 B
SET
[ EDIT ]
|
[ DEL ]
📄 doctest.py
104,391 B
SET
[ EDIT ]
|
[ DEL ]
📄 dummy_threading.py
2,815 B
SET
[ EDIT ]
|
[ DEL ]
📄 enum.py
33,606 B
SET
[ EDIT ]
|
[ DEL ]
📄 filecmp.py
9,830 B
SET
[ EDIT ]
|
[ DEL ]
📄 fileinput.py
14,471 B
SET
[ EDIT ]
|
[ DEL ]
📄 fnmatch.py
3,166 B
SET
[ EDIT ]
|
[ DEL ]
📄 formatter.py
15,143 B
SET
[ EDIT ]
|
[ DEL ]
📄 fractions.py
23,639 B
SET
[ EDIT ]
|
[ DEL ]
📄 ftplib.py
35,617 B
SET
[ EDIT ]
|
[ DEL ]
📄 functools.py
31,346 B
SET
[ EDIT ]
|
[ DEL ]
📄 genericpath.py
5,028 B
SET
[ EDIT ]
|
[ DEL ]
📄 getopt.py
7,489 B
SET
[ EDIT ]
|
[ DEL ]
📄 getpass.py
5,994 B
SET
[ EDIT ]
|
[ DEL ]
📄 gettext.py
21,530 B
SET
[ EDIT ]
|
[ DEL ]
📄 glob.py
5,638 B
SET
[ EDIT ]
|
[ DEL ]
📄 gzip.py
20,334 B
SET
[ EDIT ]
|
[ DEL ]
📄 hashlib.py
8,799 B
SET
[ EDIT ]
|
[ DEL ]
📄 heapq.py
22,929 B
SET
[ EDIT ]
|
[ DEL ]
📄 hmac.py
6,381 B
SET
[ EDIT ]
|
[ DEL ]
📄 imaplib.py
53,464 B
SET
[ EDIT ]
|
[ DEL ]
📄 imghdr.py
3,795 B
SET
[ EDIT ]
|
[ DEL ]
📄 imp.py
10,669 B
SET
[ EDIT ]
|
[ DEL ]
📄 inspect.py
116,958 B
SET
[ EDIT ]
|
[ DEL ]
📄 io.py
3,517 B
SET
[ EDIT ]
|
[ DEL ]
📄 ipaddress.py
77,818 B
SET
[ EDIT ]
|
[ DEL ]
📄 keyword.py
2,219 B
SET
[ EDIT ]
|
[ DEL ]
📄 linecache.py
5,312 B
SET
[ EDIT ]
|
[ DEL ]
📄 locale.py
77,300 B
SET
[ EDIT ]
|
[ DEL ]
📄 lzma.py
12,983 B
SET
[ EDIT ]
|
[ DEL ]
📄 macpath.py
5,971 B
SET
[ EDIT ]
|
[ DEL ]
📄 macurl2path.py
2,732 B
SET
[ EDIT ]
|
[ DEL ]
📄 mailbox.py
78,624 B
SET
[ EDIT ]
|
[ DEL ]
📄 mailcap.py
9,067 B
SET
[ EDIT ]
|
[ DEL ]
📄 mimetypes.py
21,042 B
SET
[ EDIT ]
|
[ DEL ]
📄 modulefinder.py
23,027 B
SET
[ EDIT ]
|
[ DEL ]
📄 netrc.py
5,684 B
SET
[ EDIT ]
|
[ DEL ]
📄 nntplib.py
43,078 B
SET
[ EDIT ]
|
[ DEL ]
📄 ntpath.py
23,094 B
SET
[ EDIT ]
|
[ DEL ]
📄 nturl2path.py
2,444 B
SET
[ EDIT ]
|
[ DEL ]
📄 numbers.py
10,243 B
SET
[ EDIT ]
|
[ DEL ]
📄 opcode.py
5,822 B
SET
[ EDIT ]
|
[ DEL ]
📄 operator.py
10,863 B
SET
[ EDIT ]
|
[ DEL ]
📄 optparse.py
60,371 B
SET
[ EDIT ]
|
[ DEL ]
📄 os.py
37,526 B
SET
[ EDIT ]
|
[ DEL ]
📄 pathlib.py
46,238 B
SET
[ EDIT ]
|
[ DEL ]
📄 pdb.py
61,320 B
SET
[ EDIT ]
|
[ DEL ]
📄 pickle.py
55,691 B
SET
[ EDIT ]
|
[ DEL ]
📄 pickletools.py
91,775 B
SET
[ EDIT ]
|
[ DEL ]
📄 pipes.py
8,916 B
SET
[ EDIT ]
|
[ DEL ]
📄 pkgutil.py
21,315 B
SET
[ EDIT ]
|
[ DEL ]
📄 platform.py
47,214 B
SET
[ EDIT ]
|
[ DEL ]
📄 plistlib.py
32,291 B
SET
[ EDIT ]
|
[ DEL ]
📄 poplib.py
15,087 B
SET
[ EDIT ]
|
[ DEL ]
📄 posixpath.py
16,324 B
SET
[ EDIT ]
|
[ DEL ]
📄 pprint.py
20,860 B
SET
[ EDIT ]
|
[ DEL ]
📄 profile.py
22,029 B
SET
[ EDIT ]
|
[ DEL ]
📄 pstats.py
26,564 B
SET
[ EDIT ]
|
[ DEL ]
📄 pty.py
4,763 B
SET
[ EDIT ]
|
[ DEL ]
📄 py_compile.py
7,181 B
SET
[ EDIT ]
|
[ DEL ]
📄 pyclbr.py
13,558 B
SET
[ EDIT ]
|
[ DEL ]
📄 pydoc.py
103,501 B
SET
[ EDIT ]
|
[ DEL ]
📄 queue.py
8,780 B
SET
[ EDIT ]
|
[ DEL ]
📄 quopri.py
7,262 B
SET
[ EDIT ]
|
[ DEL ]
📄 random.py
27,442 B
SET
[ EDIT ]
|
[ DEL ]
📄 re.py
15,552 B
SET
[ EDIT ]
|
[ DEL ]
📄 reprlib.py
5,336 B
SET
[ EDIT ]
|
[ DEL ]
📄 rlcompleter.py
7,097 B
SET
[ EDIT ]
|
[ DEL ]
📄 runpy.py
11,959 B
SET
[ EDIT ]
|
[ DEL ]
📄 sched.py
6,511 B
SET
[ EDIT ]
|
[ DEL ]
📄 secrets.py
2,038 B
SET
[ EDIT ]
|
[ DEL ]
📄 selectors.py
19,438 B
SET
[ EDIT ]
|
[ DEL ]
📄 shelve.py
8,515 B
SET
[ EDIT ]
|
[ DEL ]
📄 shlex.py
12,956 B
SET
[ EDIT ]
|
[ DEL ]
📄 shutil.py
40,829 B
SET
[ EDIT ]
|
[ DEL ]
📄 signal.py
2,123 B
SET
[ EDIT ]
|
[ DEL ]
📄 site.py
21,268 B
SET
[ EDIT ]
|
[ DEL ]
📄 smtpd.py
34,719 B
SET
[ EDIT ]
|
[ DEL ]
📄 smtplib.py
44,218 B
SET
[ EDIT ]
|
[ DEL ]
📄 sndhdr.py
7,088 B
SET
[ EDIT ]
|
[ DEL ]
📄 socket.py
27,443 B
SET
[ EDIT ]
|
[ DEL ]
📄 socketserver.py
27,010 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_compile.py
19,338 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_constants.py
6,821 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_parse.py
36,536 B
SET
[ EDIT ]
|
[ DEL ]
📄 ssl.py
44,509 B
SET
[ EDIT ]
|
[ DEL ]
📄 stat.py
5,038 B
SET
[ EDIT ]
|
[ DEL ]
📄 statistics.py
20,673 B
SET
[ EDIT ]
|
[ DEL ]
📄 string.py
11,795 B
SET
[ EDIT ]
|
[ DEL ]
📄 stringprep.py
12,917 B
SET
[ EDIT ]
|
[ DEL ]
📄 struct.py
257 B
SET
[ EDIT ]
|
[ DEL ]
📄 subprocess.py
62,339 B
SET
[ EDIT ]
|
[ DEL ]
📄 sunau.py
18,095 B
SET
[ EDIT ]
|
[ DEL ]
📄 symbol.py
2,119 B
SET
[ EDIT ]
|
[ DEL ]
📄 symtable.py
7,277 B
SET
[ EDIT ]
|
[ DEL ]
📄 sysconfig.py
24,876 B
SET
[ EDIT ]
|
[ DEL ]
📄 tabnanny.py
11,411 B
SET
[ EDIT ]
|
[ DEL ]
📄 tarfile.py
111,635 B
SET
[ EDIT ]
|
[ DEL ]
📄 telnetlib.py
23,136 B
SET
[ EDIT ]
|
[ DEL ]
📄 tempfile.py
28,066 B
SET
[ EDIT ]
|
[ DEL ]
📄 textwrap.py
19,558 B
SET
[ EDIT ]
|
[ DEL ]
📄 this.py
1,003 B
SET
[ EDIT ]
|
[ DEL ]
📄 threading.py
50,136 B
SET
[ EDIT ]
|
[ DEL ]
📄 timeit.py
13,342 B
SET
[ EDIT ]
|
[ DEL ]
📄 token.py
3,075 B
SET
[ EDIT ]
|
[ DEL ]
📄 tokenize.py
29,496 B
SET
[ EDIT ]
|
[ DEL ]
📄 trace.py
28,733 B
SET
[ EDIT ]
|
[ DEL ]
📄 traceback.py
23,458 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracemalloc.py
16,658 B
SET
[ EDIT ]
|
[ DEL ]
📄 tty.py
879 B
SET
[ EDIT ]
|
[ DEL ]
📄 types.py
8,870 B
SET
[ EDIT ]
|
[ DEL ]
📄 typing.py
80,274 B
SET
[ EDIT ]
|
[ DEL ]
📄 uu.py
6,763 B
SET
[ EDIT ]
|
[ DEL ]
📄 uuid.py
24,020 B
SET
[ EDIT ]
|
[ DEL ]
📄 warnings.py
18,488 B
SET
[ EDIT ]
|
[ DEL ]
📄 wave.py
17,709 B
SET
[ EDIT ]
|
[ DEL ]
📄 weakref.py
20,466 B
SET
[ EDIT ]
|
[ DEL ]
📄 webbrowser.py
22,238 B
SET
[ EDIT ]
|
[ DEL ]
📄 xdrlib.py
5,913 B
SET
[ EDIT ]
|
[ DEL ]
📄 zipapp.py
7,157 B
SET
[ EDIT ]
|
[ DEL ]
📄 zipfile.py
79,924 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: filecmp.py
"""Utilities for comparing files and directories. Classes: dircmp Functions: cmp(f1, f2, shallow=True) -> int cmpfiles(a, b, common) -> ([], [], []) clear_cache() """ import os import stat from itertools import filterfalse __all__ = ['clear_cache', 'cmp', 'dircmp', 'cmpfiles', 'DEFAULT_IGNORES'] _cache = {} BUFSIZE = 8*1024 DEFAULT_IGNORES = [ 'RCS', 'CVS', 'tags', '.git', '.hg', '.bzr', '_darcs', '__pycache__'] def clear_cache(): """Clear the filecmp cache.""" _cache.clear() def cmp(f1, f2, shallow=True): """Compare two files. Arguments: f1 -- First file name f2 -- Second file name shallow -- Just check stat signature (do not read the files). defaults to True. Return value: True if the files are the same, False otherwise. This function uses a cache for past comparisons and the results, with cache entries invalidated if their stat information changes. The cache may be cleared by calling clear_cache(). """ s1 = _sig(os.stat(f1)) s2 = _sig(os.stat(f2)) if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG: return False if shallow and s1 == s2: return True if s1[1] != s2[1]: return False outcome = _cache.get((f1, f2, s1, s2)) if outcome is None: outcome = _do_cmp(f1, f2) if len(_cache) > 100: # limit the maximum size of the cache clear_cache() _cache[f1, f2, s1, s2] = outcome return outcome def _sig(st): return (stat.S_IFMT(st.st_mode), st.st_size, st.st_mtime) def _do_cmp(f1, f2): bufsize = BUFSIZE with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2: while True: b1 = fp1.read(bufsize) b2 = fp2.read(bufsize) if b1 != b2: return False if not b1: return True # Directory comparison class. # class dircmp: """A class that manages the comparison of 2 directories. dircmp(a, b, ignore=None, hide=None) A and B are directories. IGNORE is a list of names to ignore, defaults to DEFAULT_IGNORES. HIDE is a list of names to hide, defaults to [os.curdir, os.pardir]. High level usage: x = dircmp(dir1, dir2) x.report() -> prints a report on the differences between dir1 and dir2 or x.report_partial_closure() -> prints report on differences between dir1 and dir2, and reports on common immediate subdirectories. x.report_full_closure() -> like report_partial_closure, but fully recursive. Attributes: left_list, right_list: The files in dir1 and dir2, filtered by hide and ignore. common: a list of names in both dir1 and dir2. left_only, right_only: names only in dir1, dir2. common_dirs: subdirectories in both dir1 and dir2. common_files: files in both dir1 and dir2. common_funny: names in both dir1 and dir2 where the type differs between dir1 and dir2, or the name is not stat-able. same_files: list of identical files. diff_files: list of filenames which differ. funny_files: list of files which could not be compared. subdirs: a dictionary of dircmp objects, keyed by names in common_dirs. """ def __init__(self, a, b, ignore=None, hide=None): # Initialize self.left = a self.right = b if hide is None: self.hide = [os.curdir, os.pardir] # Names never to be shown else: self.hide = hide if ignore is None: self.ignore = DEFAULT_IGNORES else: self.ignore = ignore def phase0(self): # Compare everything except common subdirectories self.left_list = _filter(os.listdir(self.left), self.hide+self.ignore) self.right_list = _filter(os.listdir(self.right), self.hide+self.ignore) self.left_list.sort() self.right_list.sort() def phase1(self): # Compute common names a = dict(zip(map(os.path.normcase, self.left_list), self.left_list)) b = dict(zip(map(os.path.normcase, self.right_list), self.right_list)) self.common = list(map(a.__getitem__, filter(b.__contains__, a))) self.left_only = list(map(a.__getitem__, filterfalse(b.__contains__, a))) self.right_only = list(map(b.__getitem__, filterfalse(a.__contains__, b))) def phase2(self): # Distinguish files, directories, funnies self.common_dirs = [] self.common_files = [] self.common_funny = [] for x in self.common: a_path = os.path.join(self.left, x) b_path = os.path.join(self.right, x) ok = 1 try: a_stat = os.stat(a_path) except OSError as why: # print('Can\'t stat', a_path, ':', why.args[1]) ok = 0 try: b_stat = os.stat(b_path) except OSError as why: # print('Can\'t stat', b_path, ':', why.args[1]) ok = 0 if ok: a_type = stat.S_IFMT(a_stat.st_mode) b_type = stat.S_IFMT(b_stat.st_mode) if a_type != b_type: self.common_funny.append(x) elif stat.S_ISDIR(a_type): self.common_dirs.append(x) elif stat.S_ISREG(a_type): self.common_files.append(x) else: self.common_funny.append(x) else: self.common_funny.append(x) def phase3(self): # Find out differences between common files xx = cmpfiles(self.left, self.right, self.common_files) self.same_files, self.diff_files, self.funny_files = xx def phase4(self): # Find out differences between common subdirectories # A new dircmp object is created for each common subdirectory, # these are stored in a dictionary indexed by filename. # The hide and ignore properties are inherited from the parent self.subdirs = {} for x in self.common_dirs: a_x = os.path.join(self.left, x) b_x = os.path.join(self.right, x) self.subdirs[x] = dircmp(a_x, b_x, self.ignore, self.hide) def phase4_closure(self): # Recursively call phase4() on subdirectories self.phase4() for sd in self.subdirs.values(): sd.phase4_closure() def report(self): # Print a report on the differences between a and b # Output format is purposely lousy print('diff', self.left, self.right) if self.left_only: self.left_only.sort() print('Only in', self.left, ':', self.left_only) if self.right_only: self.right_only.sort() print('Only in', self.right, ':', self.right_only) if self.same_files: self.same_files.sort() print('Identical files :', self.same_files) if self.diff_files: self.diff_files.sort() print('Differing files :', self.diff_files) if self.funny_files: self.funny_files.sort() print('Trouble with common files :', self.funny_files) if self.common_dirs: self.common_dirs.sort() print('Common subdirectories :', self.common_dirs) if self.common_funny: self.common_funny.sort() print('Common funny cases :', self.common_funny) def report_partial_closure(self): # Print reports on self and on subdirs self.report() for sd in self.subdirs.values(): print() sd.report() def report_full_closure(self): # Report on self and subdirs recursively self.report() for sd in self.subdirs.values(): print() sd.report_full_closure() methodmap = dict(subdirs=phase4, same_files=phase3, diff_files=phase3, funny_files=phase3, common_dirs = phase2, common_files=phase2, common_funny=phase2, common=phase1, left_only=phase1, right_only=phase1, left_list=phase0, right_list=phase0) def __getattr__(self, attr): if attr not in self.methodmap: raise AttributeError(attr) self.methodmap[attr](self) return getattr(self, attr) def cmpfiles(a, b, common, shallow=True): """Compare common files in two directories. a, b -- directory names common -- list of file names found in both directories shallow -- if true, do comparison based solely on stat() information Returns a tuple of three lists: files that compare equal files that are different filenames that aren't regular files. """ res = ([], [], []) for x in common: ax = os.path.join(a, x) bx = os.path.join(b, x) res[_cmp(ax, bx, shallow)].append(x) return res # Compare two files. # Return: # 0 for equal # 1 for different # 2 for funny cases (can't stat, etc.) # def _cmp(a, b, sh, abs=abs, cmp=cmp): try: return not abs(cmp(a, b, sh)) except OSError: return 2 # Return a copy with items that occur in skip removed. # def _filter(flist, skip): return list(filterfalse(skip.__contains__, flist)) # Demonstration and testing. # def demo(): import sys import getopt options, args = getopt.getopt(sys.argv[1:], 'r') if len(args) != 2: raise getopt.GetoptError('need exactly two args', None) dd = dircmp(args[0], args[1]) if ('-r', '') in options: dd.report_full_closure() else: dd.report() if __name__ == '__main__': demo()