method: path.extpy.visit

*Not documented*
    def visit(self, fil=None, rec=None, ignore=None, seen=None):

origin: path.extpy

where:

function source:

def visit(self, fil=None, rec=None, ignore=None, seen=None):
    def myrec(p, seen={id(self): True}):
        if id(p) in seen:
            return False
        seen[id(p)] = True
        if self.samefile(p):
            return True

    for x in super(Extpy, self).visit(fil=fil, rec=rec, ignore=ignore):
        yield x
    return

    if seen is None:
        seen = {id(self): True}

    if isinstance(fil, str):
        fil = common.fnmatch(fil)
    if isinstance(rec, str):
        rec = common.fnmatch(fil)

    if ignore:
        try:
            l = self.listdir()
        except ignore:
            return
    else:
        l = self.listdir()
    reclist = []
    for p in l:
        if fil is None or fil(p):
            yield p
        if id(p) not in seen:
            try:
                obj = p.resolve()
                if inspect.isclass(obj) or inspect.ismodule(obj):
                    reclist.append(p)
            finally:
                seen[id(p)] = p
    for p in reclist:
        for i in p.visit(fil, rec, seen):
            yield i

call sites:

called in /home/johnny/projects/merlinux/py/dist/py/path/extpy/testing/test_extpy.py

traceback path.extpy.visit.0

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback path.extpy.visit.1

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback path.extpy.visit.2

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback path.extpy.visit.3

called in /home/johnny/projects/merlinux/py/dist/py/path/extpy/testing/test_extpy.py

traceback path.extpy.visit.4

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback path.extpy.visit.5

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback path.extpy.visit.6