def _file_lines(fname):
try:<EOL><INDENT>outfile = open(fname)<EOL><DEDENT>except IOError:<EOL><INDENT>return []<EOL><DEDENT>else:<EOL><INDENT>out = outfile.readlines()<EOL>outfile.close()<EOL>return out<EOL><DEDENT>
Return the contents of a named file as a list of lines.

    This function never raises an IOError exception: if the file can't be
    read, it simply returns an empty list.