Mark Roseman <m...@markroseman.com> added the comment:

Ivan, thanks for making a good first pass of this. The thread section still 
feels a lot like 'fighting' with the model. Do you mind if I take a crack at 
it? Won't get to it for a few days, but in case you have any stuff you're in 
the middle of. 

I should clarify too that Tk apps almost universally do use a blocking event 
loop (i.e. 'vwait forever' at the end of a script). Application-level event 
handlers are supposed to respond quickly so control goes back to the event loop.

It's when control doesn't return there that things like the 'update idletasks' 
hacks are needed. In practice, I've noticed that's what seems to trip people up 
when they first start, as they try to emulate the flow of their non-GUI code, 
which frequently blocks. Far better that the program is restructured so that 
the event handler completes quickly. It's actually worse than it looks, because 
you can end up having nested event loops if you start randomly throwing this 
stuff in. That's conceptually hard for most people and a good source of bugs.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33479>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to