1

I'm making a tic-tac-toe with Tkinter with a canvas as a school homework and I've ran into a problem: I do not know how to make the restart button (the function to be more precise).

So I've searched how i could make one. But the function given on this post (Restart program tkinter) just gives me this when I start the program:

The kernel process exited.

I also simply tried to just reset all the values to their default one and erase the canvas but it doesn't work:

    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: can't invoke "button" command: application has been destroyed

Does anyone know what I have to put to make a restart function ? Thank you.

Doot
  • 63
  • 7
  • Completely restarting your code seems a bit drastic. I think you are on the right way by resetting all the variables and erasing the canvas. Try canvas.delete("all") to clear the canvas. – Daan Seuntjens Mar 05 '20 at 22:35

0 Answers0