This commit is contained in:
piair338 2022-10-16 13:20:57 +00:00
parent ae3a89802b
commit b882d0deba
1 changed files with 11 additions and 4 deletions

15
main.py
View File

@ -4,13 +4,20 @@ import configparser
import os
import shutil
default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default"
new = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
shutil.copyfile(default_config, config_path)
config = configparser.ConfigParser()
config.read(config_path)
try :
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
config.read(config_path)
except :
default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default"
shutil.copyfile(default_config, config_path)
config.read(config_path)
def confirm(texte, default = False):
if default :
txt = '[Y/n]'