<commit_before>from kivy.config import Config
from kivy.config import ConfigParser
import os

def config_instance():
    return _config

        #ini_file = "pentai.ini"

def create_config_instance(ini_file, user_path):
    global _config

    ini_path = os.path.join(user_path, ini_file)
    if not ini_file in os.listdir(user_path):
    # if True:
        log.info("Copying ini")
        import shutil
        shutil.copy(ini_file, ini_path)

    _config = ConfigParser()
    _config.read(ini_path)

    return _config<commit_msg>Import our logger for first settup code.<commit_after>from kivy.config import Config
from kivy.config import ConfigParser

import pentai.base.logger as log

import os

def config_instance():
    return _config

def create_config_instance(ini_file, user_path):
    global _config

    ini_path = os.path.join(user_path, ini_file)
    if not ini_file in os.listdir(user_path):
    #if True:
        log.info("Copying ini")
        import shutil
        shutil.copy(ini_file, ini_path)

    _config = ConfigParser()
    _config.read(ini_path)

    return _config
{'fraction_non_alphanumeric': 0.07882676443629698, 'fraction_numerical': 0.0, 'mean_word_length': 3.368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5590329', 'n_tokens_mistral': 370, 'n_tokens_neox': 352, 'n_words': 91}