One of IDLE's great features is being able to interactively work with tkinter gui's because run calls update, without blocking, in the background. Document it in a new subsection, '3.5 Developing tkinter applications'.
Adapt the following (written for a python-list response):
Mainloop is a blocking call, and while it is running, one can only interact with the data and gui in ways that one has already programmed. If you run the above with python -i, or equivalently, from an IDLE editor, you will not see a >>> prompt until you close the tk windows, at which point there is nothing left to interact with.
However, if you run the code above from an IDLE editor, you can omit or comment out the mainloop call and still see the board, because IDLE's run code calls tk's update in a non-blocking manner about 20 times a second. Without mainloop running, you immediately get a >>> prompt and can interact with the gui in a live exploratory fashion. You can enter statements like the color assignment above, and the background updates will make them quickly take effect.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
The text was updated successfully, but these errors were encountered: