Freeze with wxpython on python 2.3 or python 2.4 on Win32 with Thread

Tsubasa[Hokage] sylvain.pasquet at gmail.com
Wed Jan 26 09:16:50 EST 2005


first problem:

With Idle environnement under Win32, all freeze after with bunch of
code:

#!/usr/bin/python
import threading,time

class T (threading.Thread) :
    def __init__(self,_a,_b) :
        threading.Thread.__init__(self)
        self.a = _a
        self.b = _b
    def run(self) :
        print "T(%d,%d)"%(self.a,self.b)
        time.sleep(3)
        print "T(%d,%d)=>%d"%(self.a,self.b,self.a+self.b)
        return self.a+self.b

t = T(3,5)
t.start()


All freeze when sleep command are execute.
Second part of this problem, I have a GUI in wxpython, when I create
new thread i can't write new data in widget like a multibox when i am
in a thread :( but i can retrieve data ( GetValue works but SetValue
freeze ).

Thanks



More information about the Python-list mailing list