import codecs


def _readfile(fname, strip="\n"):
    """Shortcut for reading a text file."""

    with codecs.open(fname, 'r', 'UTF8') as fp:
        content = fp.read()
    return content.strip(strip) if strip else content