def copy(src, dst):
try:<EOL><INDENT>shutil.copytree(src, dst)<EOL><DEDENT>except OSError as exc:<EOL><INDENT>if exc.errno == errno.ENOTDIR:<EOL><INDENT>shutil.copy(src, dst)<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>
Handle the copying of a file or directory.

The destination basedir _must_ exist.

:param src: A string containing the path of the source to copy.  If the
 source ends with a '/', will become a recursive directory copy of source.
:param dst: A string containing the path to the destination.  If the
 destination ends with a '/', will copy into the target directory.
:return: None