1、通用文件copy工具实现
1)第一种方法
src_file = input('请输入源文件的路径:').strip()
dst_file = input('请输入目标文件的路径:').strip()
with open(r'{}'.format(src_file),'rb') as f1,\
open(r'{}'.format(dst_file),'wb') as f2:
content = f1.read()
f2.write(content)src_file = input('请输入