Stephen Levings <[EMAIL PROTECTED]> writes: > Does anyone have suggestions as to how to abort procedures when using > Tkinter? > > > I don't want to put polling loops into the procedures as that is > tedious and does not lend itself to generalization. I would like to do > > something like raise an exception in a separate thread but don't know > whether it can be done or how to do it.
It's is not very clear to me what exactly you are asking about. Could you rephrase? Are you thinking about communication between a GUI main thread that needs to stay responsive and a long running task that is delegated to a worker thread? As to raising an exception in one thread and catching in the other, this is not directly possible. The exception mechanism works by unravelling the stack and since that stack is exactly what two threads do not have in common, this becomes very difficult. You can of course catch an exception in the same thread that generated it and communicate the fact to another thread, but this would not be exactly like catching it in another thread than were it was raised. -- Vennlig hilsen Syver Enstad _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython
