shell相关模块 subprocess模块

上传:hanzhitang 浏览: 36 推荐: 0 文件:PDF 大小:106.79KB 上传时间:2020-12-23 02:28:04 版权申诉
系统管理模块 shutil模块 复制和移动 1.shutil.copyfileobj(fsrc,fdst[length]) 将类似文件的对象fsrc的内容复制到类似文件的对象fdst 2.shutil.copyfile(src,dst, *, follow_symlinks=True) 将名为src的文件的内容(无元数据)复制到名为dst的文件,然后返回dst # 练习 import shutil f1 = open('/etc/hosts', 'rb') f2 = open('/tmp/zhuji', 'wb') dir(shutil) shutil.copyfileobj(
上传资源
用户评论