0

I am creating a game with tkinter in which tkinter windows are sprites, but am stuck at how to create the game manager in order to execute other tkinter windows at the same time. I have tried threading, but it gives an error, which I found was due to tkinter being thread-safe and that it can only be executed by the mainloop.

Siddharth
  • 1
  • 1
  • 2
  • 1
    Instead of multiple windows, try opening multiple `Toplevel` widgets:http://effbot.org/tkinterbook/toplevel.htm –  Mar 03 '19 at 14:27
  • I can't because it is like a game with windows as sprites – Siddharth Mar 03 '19 at 14:50
  • Read [Run your own code alongside Tkinter's event loop](https://stackoverflow.com/questions/459083/how-do-you-run-your-own-code-alongside-tkinters-event-loop) – stovfl Mar 03 '19 at 17:09
  • @Siddharth Toplevels are Windows. In fact, when you instantiate tkinter.Tk() it [specifically returns a `Toplevel` widget](https://docs.python.org/3/library/tkinter.html#tkinter.Tk). – Reid Ballard Mar 04 '19 at 18:01

0 Answers0