<commit_before># Copyright (c) 2014, <NAME>
# All rights reserved.
#
# This file is covered by the 3-clause BSD license.
# See the LICENSE file in this program's distribution for details.

import logging
from logging import FileHandler

main_log = logging.getLogger ("PyDoom")
main_log.addHandler (FileHandler ("pydoom.log"))

from version import GITVERSION
from time import sleep
from sys import argv, path
import PyDoom_OpenGL
from pydoom.arguments import ArgumentParser
from pydoom.graphics import MakePalettes, Image
from pydoom.resources import WadFile

def main ():
    main_log.info ("=== PyDoom revision {} ===".format (GITVERSION))
    args = ArgumentParser (argv[1:])
    args.CollectArgs ()
    del args
    doom2 = WadFile ("doom2.wad")
    palette = MakePalettes (doom2.ReadLump (doom2.FindFirstLump ("playpal")))[0]
    titlepic = Image.LoadDoomGraphic (doom2.ReadLump (doom2.FindFirstLump ("titlepic")), palette)
    PyDoom_OpenGL.CreateWindow ((640, 480), False)
    titletex = PyDoom_OpenGL.LoadTexture (titlepic)
    PyDoom_OpenGL.BeginDrawing ()
    PyDoom_OpenGL.Draw2D (titletex, (0, 0, 640, 480))
    PyDoom_OpenGL.FinishDrawing ()
    sleep (5)
    PyDoom_OpenGL.DestroyWindow ()<commit_msg>Display info messages in the console/file log<commit_after># Copyright (c) 2014, <NAME>
# All rights reserved.
#
# This file is covered by the 3-clause BSD license.
# See the LICENSE file in this program's distribution for details.

import logging
from logging import FileHandler

main_log = logging.getLogger ("PyDoom")
main_log.setLevel ("INFO")
main_log.addHandler (FileHandler ("pydoom.log"))

from version import GITVERSION
from time import sleep
from sys import argv, path
import PyDoom_OpenGL
from pydoom.arguments import ArgumentParser
from pydoom.graphics import MakePalettes, Image
from pydoom.resources import WadFile

def main ():
    main_log.info ("=== PyDoom revision {} ===".format (GITVERSION))
    args = ArgumentParser (argv[1:])
    args.CollectArgs ()
    del args
    doom2 = WadFile ("doom2.wad")
    palette = MakePalettes (doom2.ReadLump (doom2.FindFirstLump ("playpal")))[0]
    titlepic = Image.LoadDoomGraphic (doom2.ReadLump (doom2.FindFirstLump ("titlepic")), palette)
    PyDoom_OpenGL.CreateWindow ((640, 480), False)
    titletex = PyDoom_OpenGL.LoadTexture (titlepic)
    PyDoom_OpenGL.BeginDrawing ()
    PyDoom_OpenGL.Draw2D (titletex, (0, 0, 640, 480))
    PyDoom_OpenGL.FinishDrawing ()
    sleep (5)
    PyDoom_OpenGL.DestroyWindow ()
{'fraction_non_alphanumeric': 0.10534780860474467, 'fraction_numerical': 0.02332127060715722, 'mean_word_length': 4.693363844393593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2302034', 'n_tokens_mistral': 855, 'n_tokens_neox': 814, 'n_words': 232}