python: delete non-empty dir
file, python
Solution
Use `shutil.rmtree`:
import shutil
shutil.rmtree(path)
See the documentation for details of how to handle and/or ignore errors.
Problem
How do I delete a possibly non-empty dir in Python. The directory may have nested subdirectories many levels deep.