Sublime Forum

Python with Tkinter

#1

When I run any program with Tkinter, potentially with other graphics packages as well, anything that is supposed to print in the program does not print until after the canvas window has been closed. It should be printing in real time, instead of printing everything all at once after the window is closed. Having it print in real time is very convenient for debugging and I can’t seem to figure out why this is happening.

Any help would be greatly appreciated!

0 Likes

#2

Have you tried specifying the -u switch in your Python startup command? (Tells Python to use un-buffered stdin and stdout).

0 Likes

#3

Worked perfectly. Thanks!

0 Likes

#4

:wink: Glad I could help.

0 Likes