You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
622 B

#!/usr/bin/env python3
"""Test if tkinter works"""
import sys
# Test basic tkinter
try:
import tkinter as tk
print("✓ tkinter imported")
except ImportError as e:
print(f"✗ Failed to import tkinter: {e}")
sys.exit(1)
# Test creating a window
try:
root = tk.Tk()
print("✓ Created Tk root window")
root.withdraw() # Don't show it
print("✓ Window hidden")
root.destroy()
print("✓ Window destroyed")
print("\ntkinter is working correctly!")
except Exception as e:
print(f"✗ Error with tkinter: {e}")
import traceback
traceback.print_exc()
sys.exit(1)