wxPython and threads again

perchef francois.perche at gmail.com
Wed Aug 10 16:15:23 CEST 2005


I have several files to download and a GUI to update. I know this is a
frequently asked question but i can't find an appropriate solution.
My Downloader extends threading.Thread and update a wx.Gauge in GUI
during the process.

for src in urls:
       downloader = Downloader( src, destination, GUI )

#work with the downloaded files...

If i don't use a downloader.join() in this for loop, I launch several
threads at the same time and so my wx.Gauge is bouncing up and down.
If i do add the downloader.join() my GUI is no more updated ( in fact,
nothing appears, it's frozen )
How can I wait the end of the thread and also be able to update the GUI
( I have to wait, otherwise I will work uncompleted files )

Any way to work around it?

More information about the Python-list mailing list