import tarfile


def get_file_from_tar(tar_path, file_name):
    """
    Using a partial or full file name, get the full path of the file within the tar.
    @param tar_path: path to a tar file
    @param file_name: full file name or end of the filename to find
    @return the path for the file
    """
    with tarfile.open(tar_path, 'r') as tar_fh:
        for i in tar_fh.getmembers():
            if i.name.endswith(file_name):
                return i.name