Re: wxPython and threads again

2005-08-11 Thread Peter Hansen
David E. Konerding DSD staff wrote: > http://wxwidgets.org/manuals/2.6.1/wx_threadfunctions.html#threadfunctions > > This strongly suggests you can arbitrarily grab the wx GUI lock and call GUI > functions from any thread. It's still voodoo. But we're adults here, and > practicing > voodoo isn'

Re: wxPython and threads again

2005-08-11 Thread David E. Konerding DSD staff
On 2005-08-10, Peter Hansen <[EMAIL PROTECTED]> wrote: > David E. Konerding DSD staff wrote: >> Further, calling wx from a thread other than the one running the event > > loop is deep voodoo and should typically be avoided. > > "Typically"? Let's just say "always" and maybe use the phrase "certai

Re: wxPython and threads again

2005-08-11 Thread David E. Konerding DSD staff
On 2005-08-10, Bryan Olson <[EMAIL PROTECTED]> wrote: > > The easiest approach, though, is to use the threadedselectreactor in > Twisted (you need > > to check the HEAD branch out with subversion, because that reactor > isn't included in any releases). > > With threadedselectreactor, it's easy to

Re: wxPython and threads again

2005-08-10 Thread Christopher Subich
David E. Konerding DSD staff wrote: > The easiest approach, though, is to use the threadedselectreactor in Twisted > (you need > to check the HEAD branch out with subversion, because that reactor isn't > included in any releases). > With threadedselectreactor, it's easy to incorporate both the GU

Re: wxPython and threads again

2005-08-10 Thread Bryan Olson
Peter Hansen wrote: > David E. Konerding DSD staff wrote: >> Further, calling wx from a thread other than the one running the >> event loop is deep voodoo and should typically be avoided. > > "Typically"? Let's just say "always" and maybe use the phrase "certain > to corrupt wx and crash the

Re: wxPython and threads again

2005-08-10 Thread perchef
thanks for all these advices. I think a custom event will be the way to go. for the moment I use something _really_ ugly : a mix between GUI, threads and recursive fonctions. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and threads again

2005-08-10 Thread Peter Hansen
David E. Konerding DSD staff wrote: > Further, calling wx from a thread other than the one running the event > loop is deep voodoo and should typically be avoided. "Typically"? Let's just say "always" and maybe use the phrase "certain to corrupt wx and crash the app" instead of "deep voodoo".

Re: wxPython and threads again

2005-08-10 Thread Bryan Olson
David E. Konerding DSD staff wrote: [...] > You need another way to pass completion information between the downloader > thread and the main thread; the simplest way is to define a custom wx > Event, and wxPostEvent from the downloader thread when it completes ( > and when the gauge should be

Re: wxPython and threads again

2005-08-10 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, perchef wrote: > Hi, > > 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

wxPython and threads again

2005-08-10 Thread perchef
Hi, 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,