My problem is simple, but i really don't know what the issue is. I'm trying to open more than one window almost at the same time, but if i do it like that:
from tkinter import *
import threading
import time
class new_window:
def build(self, killtime):
self.w = Tk()
self.w.update()
time.sleep(killtime)
self.w.destroy()
def __init__(self, killtime):
threading.Thread(target=self.build(killtime)).start()
a = new_window(2)
time.sleep(2)
b = new_window(2)
it doesn't behave like: "open, wait, open" but instead like: "open, wait until killed, wait, open"
What i mean is that the delay starts after the first window is closed, not after the window started. I thought a Thread would help me out, but it didn't.
Hopefully one of you knows how to fix that.