Trying to make a cancel-able python script on mac in rhino 6.
import rhinoscriptsyntax as rs import Rhino def TimeConsumingTask(): for i in range(10000): # Was escape key pressed? Rhino.RhinoApp.Wait() rs.Sleep(1) if (scriptcontext.escape_test(False)): print "TimeConsumingTask cancelled." break print i TimeConsumingTask()
I found these commands to try and help escape_test be detected, but no luck.
Anybody have a fix for this or should it be reported as a bug?