I have an application which has several functions that are somewhat long-running (e.g. 10 to 15 seconds). The application has a console window that displays various messages. The console is a wx.richtext.RichTextCtrl. I would like to do something along the lines of:
Display message “Starting to do thing…”
Do thing
Display message “Done with thing”
but the messages don’t appear until the thing is all done. I tried putting “Do thing” and the final message in a separate function, called with wx.CallAfter, hoping this would give the first message a chance to appear, but that didn’t help. I could put “Do thing” in a different thread, but I don’t really want the user interface to be usable during thing, I only want the message to appear in the console.
Can anyone suggest a way to make this work?
Thanks,
Matthew