Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from threading import Thread
- from Tkinter import *
- from time import sleep
- class _timeout(Thread):
- def __init__(self, finestra):
- Thread.__init__(self)
- self.finestra = finestra
- def run(self):
- sleep(5)
- print('asd')
- self.finestra.destroy()
- class AppBase:
- def __init__(self, titolo):
- self.finestra = Tk()
- self.finestra.title(titolo)
- quadro1 = Frame(self.finestra)
- my_thread = _timeout(self.finestra)
- my_thread.start()
- self.finestra.mainloop()
- AppBase('test multi')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement