def read_file(filename):
    """Read file and return it as a string.

    :param str filename: Absolute pathname of the file.

    """
    content = ''
    try:
        with open(filename, 'r') as f:
            for line in f:
                content = content + line
    except IOError:
        print('Error: unable to open {}'.format(filename))
    return content
