def __init__(self, folder, callback, file_pattern=["*.log"], includeSubFolder=False, excludeFileListFile=None, tail_lines=0,
                       sizehint=1048576):
        self.folder = os.path.realpath(folder)
        self.file_pattern = file_pattern
        self.includeSubFolder=includeSubFolder
        self.excludeFileListFile=excludeFileListFile
        self._files_map = {}
        self._callback = callback
        self._sizehint = sizehint
        assert os.path.isdir(self.folder), self.folder
        assert callable(callback), repr(callback)
        self.update_files()
        for id, file in self._files_map.items():
            file.seek(os.path.getsize(file.name))  # EOF
            if tail_lines:
                try:
                    lines = self.tail(file.name, tail_lines)
                except IOError as err:
                    if err.errno != errno.ENOENT:
                        raise
                else:
                    if lines:
                        self._callback(file.name, lines)
Calculates stats about the players historical performance.
dataset/ETHPy150Open harryliu/edwin/edwinAgent/site_packages/logwatch_glob.py/LogWatcher.__init__--crossover with--dataset/ETHPy150Open jzahedieh/django-tennis-ladder/ladder/models.py/Player.player_stats