Jack Uretsky wrote:
I have a sequence of events ocurring in real time. To each event I display a corresponing .jpg picture. The number of events may be in the hundreds. There are eight pictures.

where are these "events" coming from?

In any case, one route is to have a main wxPython application. In its OnInit method, start up another thread that runs the code that listens for events.

In that code, when you get an event, call:

wx.CallAfter(some_func_to_update_image)

In some_func_to_update_image()

You, well, update the image in your wxPython code. I think I already posted an example of how to do that.

You put the listening code in a separate thread, so it won't block the wxPython MainLoop -- if all you are doing is displaying these images, that may not be necessary, though you'll have to do something so that the user can at least interact enough with the GUI enough to quit it.

wx.CallAfter() is a way to deal with the fact that wxPython is not thread safe, so you can't make GUI calls directly from another thread.

HTH,

-Chris






--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to