Use Path.rglob
(substitutes the leading **
in Path().glob("**/*")
):
path = Path("docs")
for p in path.rglob("*"):
print(p.name)
More Related Contents:
- Discord Py on_message bot=False blocked?
- Python script to ping linux server
- How to use global variables in Python?
- What does a b prefix before a python string mean?
- Why is dictionary ordering non-deterministic?
- How to run Spyder in virtual environment?
- What’s the difference between str.isdigit, isnumeric and isdecimal in python?
- Scrolling to element using webdriver?
- How to prevent iterator getting exhausted?
- How to match any string from a list of strings in regular expressions in python?
- TypeError: ‘range’ object does not support item assignment
- Is it bad practice to use a built-in function name as an attribute or method identifier?
- How can I get the domain name of my site within a Django template?
- How to suppress or capture the output of subprocess.run()?
- How to make unicode string with python3
- PyYAML dump format
- Is it possible to make the keyboard module work with pygame and threading
- Sending a password over SSH or SCP with subprocess.Popen
- Finding the nearest value and return the index of array in Python
- How to Open a file through python
- Error in Python script “Expected 2D array, got 1D array instead:”?
- multiprocessing vs multithreading vs asyncio
- Difference between AbstractUser and AbstractBaseUser in Django?
- Pip is not working for Python 3.10 on Ubuntu
- How to expire Django session in 5minutes?
- requests.get returns 403 while the same url works in browser
- What is absolute import in python?
- Why does setattr fail on a bound method
- How to limit number of CPU’s used by a python script w/o terminal or multiprocessing library?
- Printing subscript in python