def copyfile(src, dst, verbose=False):
    """Copies the specified source file to destination *file* if it is newer
    or does not yet exist.
    """
    from os import waitpid
    from subprocess import Popen, PIPE
    prsync = Popen('rsync {}-t -u {} {}'.format('-v ' if verbose else '',
        src, dst), shell=True, executable='/bin/bash', stdout=PIPE, stderr=
        PIPE, close_fds=True)
    waitpid(prsync.pid, 0)
    error = prsync.stderr.readlines()
    prsync.stderr.close()
    prsync.stdout.close()
    if len(error) > 0:
        from fortpy.msg import warn
        warn('Error while copying {} using rsync.\n\n{}'.format(src, '\n'.
            join(error)))
