1. 生成目录
函数原型:distutils.dir_util.mkpath(name[, mode=0777, verbose=0, dry_run=0])
from distutils import dir_util dir_util.mkpath("new_dir")
2. 删除目录
函数原型:distutils.dir_util.remove_tree(directory[, verbose=0, dry_run=0])
from distutils import dir_util dir_util.remove_tree(del_dir)
3. 拷贝目录
函数原型:distutils.dir_util.copy_tree(src, dst[, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0])
from distutils import dir_util dir_util.copy_tree("del", "del_copy")