def copy(source, destination):
    """ Copy file from source to destination if needed (skip if source
    is destination).
    """
    source = os.path.abspath(source)
    destination = os.path.abspath(destination)
    if source != destination:
        if not os.path.exists(os.path.dirname(destination)):
            os.makedirs(os.path.dirname(destination))
        shutil.copyfile(source, destination)
def copy ( source , destination ) : source = os . path . abspath ( source ) destination = os . path . abspath ( destination ) if source != destination : if not os . path . exists ( os . path . dirname ( destination ) ) : os . makedirs ( os . path . dirname ( destination ) ) shutil . copyfile ( source , destination )
Copy file from source to destination if needed (skip if source
    is destination).