def copy2(src, dst):
 if os.path.isdir(dst):
  dst = os.path.join(dst, os.path.basename(src))
 copyfile(src, dst)
 copystat(src, dst)

def copy2 ( src , dst ) : if os . path . isdir ( dst ) : dst = os . path . join ( dst , os . path . basename ( src ) ) copyfile ( src , dst ) copystat ( src , dst )
copy data and all stat info .