import re


def get_contents (fname):
    """
        Return the contents of the given file.
        Strip comments (lines starting with ;)
    """
    if type(fname) == list:
        contents = '\n'.join(fname)
    else:
        fp = open (fname, "r")
        contents = fp.read()
        fp.close()
    return re.sub(r"\s*;(.*?)\n", "\n", contents).strip()