def get_lines(filename):
    """
    Read in lines from file, stripping new line markers

    Parameters
    ----------
    filename : str, pathlike
        Path to file.

    Returns
    -------
    lines : list
        List containing each line.
    """

    lines = []
    try:
        fh = open(filename, 'r')
    except OSError:
        msg = 'Cannot open input file ' + filename
        raise Warning(msg)
    else:
        # Get lines of file
        for line in fh:
            lines.append(line.rstrip('\n'))
        fh.close()

    return lines