threads problem in python

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 14 02:26:41 EDT 2008


En Tue, 13 May 2008 20:46:51 -0300, Astan Chee <stanc at al.com.au> escribió:

> Sorry, I mean functions not classes. Well, actually, one is a class and
> another is a function. So when the script (its a free game btw) runs, it
> instantiates the first class and somewhere in the middle of processing
> the first class, I need to call a function as a separate thread, I also
> want to wait for the function to complete and I was wondering how python
> handles the thread of this function? Does it die when the function
> completes? Anyway, I know it sounds silly to have 2 threads when I can
> do it with one, but Im using wx to render opengl objects using pygame.
> So it has to be a separate thread, otherwise wx wont play nice. Is there
> a simple example of how I can do this?

That's why I asked about the GUI library used. For wx see  
http://wiki.wxpython.org/LongRunningTasks

-- 
Gabriel Genellina




More information about the Python-list mailing list