For some reason, when I close the window on my tkinter, it pops back up again. Not sure how to fix it. The wait_window
is there, but it doesn't seem to work.
import tkinter
class Othello:
def __init__(self, othello_game):
self.state = othello_game
self._root_window = tkinter.Tk()
self._root_window.title('Othello')
self._canvas = tkinter.Canvas(master=self._root_window,
width=800, height=800,
background='yellow')
self._canvas.grid(row=1, column=0, padx=1, pady=1)
self._root_window.rowconfigure(0, weight=1)
self._root_window.columnconfigure(0, weight=1)
self._root_window.wait_window()
def start(self) -> None:
self._root_window.mainloop()
if __name__ == '__main__':
while True:
start_game = Othello("othello_game")
start_game.start()