tg-ws-proxy/ui/tray_ctk.py

13 lines
282 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Общие операции с окнами CustomTkinter / tkinter."""
from __future__ import annotations
def destroy_root_safely(root) -> None:
import tkinter as tk
try:
if root.winfo_exists():
root.destroy()
except tk.TclError:
pass