I was about to post this earlier today but found the solution some time later, so consider this a little public service announcement:
Is there any way from preventing Rhino’s UI from locking up and the Rhino window from ‘Not Responding’ during the execution of a long python script?
Amazingly, I just searched the developer forum and couldn’t find anything on this subject, as it’s been a constant issue for me over the past few years.
I’m working on a deeply recursive, single threaded script that takes ages to complete and needed some indication of what was going on (via StatusBar messages), which of course don’t update when Rhino’s UI freezes.
What ended up working for me was to sprinkle:
Rhino.RhinoApp.Wait() # Pauses to keep Windows message pump alive so views will update and windows will repaint.
At those points in the loops where I’d like Rhino’s main window to update.