From 5e9a8d457056aed897ff0f91a625c567b75ccb35 Mon Sep 17 00:00:00 2001 From: tassosmak Date: Thu, 2 Feb 2023 13:11:51 +0200 Subject: [PATCH] Simplified FTU --- Kernel/FTU.py | 34 ++++------------------------------ Kernel/flags.py | 7 +++++++ 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/Kernel/FTU.py b/Kernel/FTU.py index 46b0650..7e8127b 100644 --- a/Kernel/FTU.py +++ b/Kernel/FTU.py @@ -71,36 +71,10 @@ def __init__(self, edit_use=True): #Install_Deperndices clear_screen() - try: - import customtkinter - except ModuleNotFoundError: - ftu_install.install(name="customtkinter") - try: - import rich - except ModuleNotFoundError: - ftu_install.install(name="rich") - try: - import playwright - except ModuleNotFoundError: - ftu_install.install(name="playwright") - try: - import pyrad - except ModuleNotFoundError: - ftu_install.install(name="pyrad") - try: - import clipboard - except ModuleNotFoundError: - ftu_install.install(name="clipboard") - try: - import customtkinter - import pyrad - import clipboard - import playwright - import rich - except ModuleNotFoundError: - RD.CommandSay("PIP is missing\ncritical features will not work\n Wait a Moment", "FAIL") - import time - time.sleep(7) + num = 0 + while len(flags.Dependecies) > num: + ftu_install.install(flags.Dependecies[num]) + num += 1 os.system('playwright install') if not flags.MODE == "9": clear_screen() \ No newline at end of file diff --git a/Kernel/flags.py b/Kernel/flags.py index 89741ad..895a055 100644 --- a/Kernel/flags.py +++ b/Kernel/flags.py @@ -21,6 +21,13 @@ Flags End ''' +Dependecies = [ + 'customtkinter', + 'rich', + 'playwright', + 'pyrad', + 'clipboard', +] ModeList = [ '1',