Michiel Jan Laurens de Hoon wrote: > If, however, Python contains an event loop that takes care of events as > well as Python commands, redrawing won't happen until Python has > executed all plot commands -- so no repainting in vain here.
Ah, I think now I understand the problem. It seems that you don't care at all about event loops. What you really want to know is "when is Python idle?", by "being idle" defines as "there are no commands being processed at the interactive interpreter", or perhaps "there are no commands being processed in the main thread", or perhaps "there are no commands being processed in any thread". Is that a correct problem statement? If so, please don't say that you want an event loop. Instead, it appears that you want to hook into the interpreter loop. As others have commented, it should be possible to get nearly the same effect without such hooking. For example, if you chose to redraw at most 10 times per second, you will still get good performance. Alternatively, you could chose to redraw if there was no drawing command for 100ms. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com