Update utilities.py

This commit is contained in:
Saifeddine ALOUI 2024-10-08 11:25:11 +02:00 committed by GitHub
parent eefff3c85c
commit 73dea2872c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,6 +337,9 @@ def show_custom_dialog(title, text, options):
def show_yes_no_dialog(title, text):
try:
import pipmaster as pm
if not pm.is_installed("tk"):
pm.install("tk")
import tkinter as tk
from tkinter import messagebox
# Create a new Tkinter root window and hide it
@ -1267,4 +1270,4 @@ def remove_text_from_string(string: str, text_to_find:str):
if index != -1:
string = string[:index]
return string
return string