def upload_file(localfile, remote, remotefile, scp='scp'):
    """Run ``{scp} {localfile} {remote}:{remotefile}``

    Parameters:
        localfile (str): relative or absolute path to a local file
        remote (str): Host on which to put the file
        remotefile (str): remote path where to put the file. May start with '~'
            to indicate the home directory.
        scp (str): the scp executables. If not a full path, the executable must
            be in ``$PATH``.

    Raises:
        subprocess.CalledProcessError: if call to `scp` fails.
    """
    sp.check_output(
        [scp, localfile, remote+':'+remotefile],
        stderr=sp.STDOUT)
def upload_file ( localfile , remote , remotefile , scp = 'scp' ) : sp . check_output ( [ scp , localfile , remote + ':' + remotefile ] , stderr = sp . STDOUT )
Run ``{scp} {localfile} {remote}:{remotefile}``

    Parameters:
        localfile (str): relative or absolute path to a local file
        remote (str): Host on which to put the file
        remotefile (str): remote path where to put the file. May start with '~'
            to indicate the home directory.
        scp (str): the scp executables. If not a full path, the executable must
            be in ``$PATH``.

    Raises:
        subprocess.CalledProcessError: if call to `scp` fails.