Path.rglob(pattern)
This is like calling glob()
with “**
” added in front of the given pattern:
>>> sorted(Path().rglob("*.py")) [PosixPath('build/lib/pathlib.py'), PosixPath('docs/conf.py'), PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib.py')]
Please login to continue.