def copy2(src, dst):
if os.path.isdir(dst):<EOL><INDENT>dst = os.path.join(dst, os.path.basename(src))<EOL><DEDENT>copyfile(src, dst)<EOL>copystat(src, dst)<EOL>
Copy data and all stat info ("cp -p src dst").

    The destination may be a directory.