welcome to my blog 在Linux下删除非空的文件夹, 可以使用os模块的system()方法 使用该方法要小心! 小心! 小心! 别写错路径, 误删文件就麻烦了! os.system('rm -rf 文件夹路径')