On 14-nov-2005, at 8:16, Josiah Carlson wrote: > > I personally like Edward Loper's idea of just running your own event > handler which deals with drawing, suspend/resume, etc... > >> 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. > > ...but even without posting and reading events as stated above, one > could check for plot events every 1/100th a second. If there is an > update, and it has been 10/100 seconds since that undrawn event > happened, > redraw. Tune that 10 up/down to alter responsiveness characteristics. > > Or heck, if you are really lazy, people can use a plot() calls, but > until an update_plot() is called, the plot isn't updated.
I wonder why nobody has suggested a seperate thread for managing the GUI and using the hook in Python's event loop to issue the call to update_plot. Ronald > > There are many reasonable solutions to your problem, not all of which > involve changing Python's event loop. > > - Josiah > > _______________________________________________ > 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/ > ronaldoussoren%40mac.com _______________________________________________ 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