Problem with busy cursor and threads

Thanks to Robin.
I already solved the problem with active threads. Now I can check threads but I can not change
the cursor from BUSY to NORMAL.
I use
...
...
#here new threads are started
....
....

if threading.activeCount()>1:
            self.timer1 = wxPyTimer(self.CountThreads)
            self.timer1.Start(1000)
            self.CountThreads()

...
...
...

def CountThreads(self):
    wxBeginBusyCursor(wxHOURGLASS_CURSOR)
        if threading.activeCount()<=1:
            self.timer1.Stop()
            if wxIsBusy():
                wxEndBusyCursor() # this does not change the cursor. WHY?

Thanks for help
Lad.

···

export@hope.cz wrote:
> I use threading modul in my program
> When a user starts one procedure , several threads start running and a normal cursor is
> changed to busy cursor. I would like to have the busy cursor as long as this procedure runs in
> other words as long as only one thread is running.
> But how can I monitor if all threads were finished already?

Create a Timer whose handler will check the status of all the thread
objects and changes the cursor when all are done and then stops the timer.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org