*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
called in /home/johnny/projects/merlinux/py/dist/py/path/extpy/testing/test_extpy.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/extpy/testing/test_extpy.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py