-2
Whoa, guys, I’m having a very simple doubt.
I need to close the Tkinter window after a few seconds automatically, someone can help me?
Follows the code:
from tkinter import *
from PIL import ImageTk,Image
import os
root = Tk()
root.iconbitmap('1.jpeg')
root.overrideredirect(True)
root.geometry("{0}x{1}+0+0".format(root.winfo_screenwidth(), root.winfo_screenheight()))
root.focus_set() # <-- move focus to this widget
root.bind("<Escape>", lambda e: e.widget.quit())
my_img = ImageTk.PhotoImage(Image.open("1.jpeg"))
my_label = Label(image=my_img)
my_label.pack()
root.mainloop()
exit()