wxHTML, threads and refreshing

Hi,

I am looking for tips, bits of code etc.. to make this work.
What I am trying to do is create an app that will display it's output (a html file) in a html widget. My problem is that the html file should reload every 15 seconds or so after being updated with fresh information. That information is pulled out of an xml file.

I thought threads might be the best way to do this, but I got really confused looking at some of the threading examples.

Ideally, when a menu item (File>Start) is choosen, the thread starts, and the xml file is processed for the first time. It's queued up, and the queue is checked (asynchronously) and the result is displayed.

So my big question is, are there any really good examples of asynchronous threading in wxPython? And my minor question is how would I reload a html file in the wxhtml widget?

···

--
"When you do become Satan's Mistress, as you've always dreamed, don't forget us, the little people"

Steven Bell wrote:

Hi,

I am looking for tips, bits of code etc.. to make this work.
What I am trying to do is create an app that will display it's output (a html file) in a html widget. My problem is that the html file should reload every 15 seconds or so after being updated with fresh information. That information is pulled out of an xml file.

I thought threads might be the best way to do this, but I got really confused looking at some of the threading examples.

You could do your xml precessing in a worker thread, but since you want the reloads to be periodic maybe a timer would be easier to use to do the updating?

And my minor question is how would I reload a html file in the wxhtml widget?

Just call htmlWindow.LoadFile again.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!