file - How do I remove/delete a folder that is not empty with Python? - Stack Overflow
2012-06-08 18:20
543 查看
file - How do I remove/delete a folder that is not empty with Python? - Stack Overflow
import shutil
shutil.rmtree('/folder_name')
shutil.rmtree('/folder_name')
相关文章推荐
- How do I open an editor on something that is not a file?
- How do I open an editor on something that is not a file?
- Error 24 Could not delete file 'e:/debug/vc80.idb'. Make sure that the file is not open by another p
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
- The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- How to pass SOAP headers into python SUDS that are not defined in WSDL file
- Error “Cannot Delete folder: The directory is not empty” Fix
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- How can we listen for errors that do not trigger window.onerror?
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- iOS 'The sandbox is not sync with the Podfile.lock
- Python使用eval强制转换字符串为字典时报错:File "<string>", line 1, in <module> NameError: name 'nan' is not defined
- how to fix GIT error: object file is empty?
- mac 项目the sandbox is not sync with the podfile.lock问题解决
- 偶遇-Two Filesystems with the same UUID have been detected. Make sure you do not have two ESXi installations
- [ERR] Node is not empty. Either the node already knows other nodes (check with C
- the tomcat installation directory is not valid. It is missing excepted file or folder
- A file with the correct name was found in this directory, but it is not the correct one.