复制代码 代码如下:#!c:\python27\python.exe# -*- coding: utf-8 -*- import osimport re from os import pathfrom shutil import rmtree DEL_DIRS = NoneDEL_FILES = r'(.+?\.pyc$|.+?\.pyo$|.+?\.log$)’ def del_dir(p): “””Delete a directory.””” if path.isdir(p): rmtree(p) print(‘D : %s’ % p) def de