def parseFile( self, file_or_filename ):
try:<EOL><INDENT>file_contents = file_or_filename.read()<EOL><DEDENT>except AttributeError:<EOL><INDENT>f = open(file_or_filename, "<STR_LIT:rb>")<EOL>file_contents = f.read()<EOL>f.close()<EOL><DEDENT>return self.parseString(file_contents)<EOL>
Execute the parse expression on the given file or filename.
           If a filename is specified (instead of a file object),
           the entire file is opened, read, and closed before parsing.