@staticmethod<EOL><INDENT>def parse_supybot_log(filepath):<DEDENT>
with open(filepath, '<STR_LIT:r>', errors='<STR_LIT>',<EOL>newline=os.linesep) as f:<EOL><INDENT>parser = SupybotParser(f)<EOL>try:<EOL><INDENT>for message in parser.parse():<EOL><INDENT>yield message<EOL><DEDENT><DEDENT>except ParseError as e:<EOL><INDENT>cause = "<STR_LIT>" % (filepath, str(e))<EOL>raise ParseError(cause=cause)<EOL><DEDENT><DEDENT>
Parse a Supybot IRC log file.

        The method parses the Supybot IRC log file and returns an iterator of
        dictionaries. Each one of this, contains a message from the file.

        :param filepath: path to the IRC log file

        :returns: a generator of parsed messages

        :raises ParseError: raised when the format of the Supybot log file
            is invalid
        :raises OSError: raised when an error occurs reading the
            given file