Home Download Buy Blog Forum Support

Python with Tkinter

Python with Tkinter

Postby meyer0095 on Tue Oct 29, 2013 3:09 pm

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!
meyer0095
 
Posts: 2
Joined: Tue Oct 29, 2013 3:06 pm

Re: Python with Tkinter

Postby oldwarhorse on Tue Oct 29, 2013 4:38 pm

Have you tried specifying the -u switch in your Python startup command? (Tells Python to use un-buffered stdin and stdout).
oldwarhorse
 
Posts: 40
Joined: Wed Oct 03, 2012 12:34 am

Re: Python with Tkinter

Postby meyer0095 on Tue Oct 29, 2013 5:38 pm

Worked perfectly. Thanks!
meyer0095
 
Posts: 2
Joined: Tue Oct 29, 2013 3:06 pm

Re: Python with Tkinter

Postby oldwarhorse on Tue Oct 29, 2013 8:35 pm

;) Glad I could help.
oldwarhorse
 
Posts: 40
Joined: Wed Oct 03, 2012 12:34 am


Return to Technical Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 24 guests