Hi,
I think I have a problem with a long running process. I read the
following link and tried to implement few solutions but could not make
it work.
http://wiki.wxpython.org/LongRunningTasks
Basically I have a gui (a kind of movie player) that shows a movie
using images. So in a for loop I iterate over images and show them
like a movie. I use wx.BufferedPaintDC to show the image. When I am in
the for loop, the gui does not respond to any button clicks etc.
I tried the wx.Yield() trick. I call the wx.Yield() before I paint an
image. But it is not responding properly.
I tried moving image painting to onIdle() method which paints an image
everytime it is called. But it only paints when I move my mouse. If I
just sit idle it won't do anything.
I tried using multiple threads, but it also failed and gave some
errors. Heard that multiple threads is not robust.
There are few things I didn't understand. The link talks about long
process which I assume are non-gui tasks. Does painting image using
wx.BufferedPaintDC on a panel come under non-gui task which is taking
the majority of time? If not why isn't onIdle called when painting is
over? I was expecting it continuously paints on the panel.
Can any one give me some suggestions.
Cheers,
dksr