(src, dst)
Copy data and mode bits ("cp src dst").

    The destination may be a directory.
Copy data and mode bits ("cp src dst").
Copy data and mode bits ( cp src dst ) .
def copy(src, dst):
    """Copy data and mode bits ("cp src dst").

    The destination may be a directory.

    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    copyfile(src, dst)
    copymode(src, dst)
def copy ( src , dst ) : if os . path . isdir ( dst ) : dst = os . path . join ( dst , os . path . basename ( src ) ) copyfile ( src , dst ) copymode ( src , dst )