import shutil
argetdir_path = 'D:\\Python\\code\\PyQt\\1_study.py'
Targetfile_path = 'D:\\Python\\code\\2_study.py'
shutil.copyfile(argetdir_path, Targetfile_path)
上面的代码是说把路径为D:\Python\code\PyQt\1_study.py的文件1_study.py复制到D:\Python\code\2_study.py的路径下面去,复制过来的文件叫2_study.py