[Tutor] cannot get a label message to display immediately

Bill Allen wallenpb at gmail.com
Sat Aug 15 17:31:26 CEST 2015


On Sat, Aug 15, 2015 at 2:21 AM, Alan Gauld <alan.gauld at btinternet.com>
wrote:
That works for getting the message printed but it still leaves
>
> the problem that your UI locks up during the long process.
> If its only for a couple of seconds it might be a mild hiccup
> but if your processing took, say 5s or longer, the user is
> likely to think the program is broken and may force kill
> the window or process or take similarly drastic action.
>
> That's why it's important to break the long process into
> chunks and call after() from within it. (or run it in the
> background) To do otherwise is to risk having your process
> cut short in mid flow with the data potentially only
> half processed - and you won't know which half!


Yes, I see.  I will start working on reorganizing the code with that in
mind.  One other thing that I have found that is quite interesting is that
with my current code the use of after() works as expect with the message to
the user showing up in the UI - if I run it through the IDLE editor.
However, when I run the program from the command line or compile (package)
the program with pyinstaller and run it as a standalone executable the
message to the user does not show up in the UI!


More information about the Tutor mailing list