Re: How to Restart a thread

2006-11-25 Thread Rob Williscroft
many_years_after wrote in news:1164467660.760671.145440 @j44g2000cwa.googlegroups.com in comp.lang.python: > class mythread(threading.Thread): > def __init__(self, threadname): > threading.Thread.__init__(self, name = threadname) > > def run(self): > print 'i am running' >

How to Restart a thread

2006-11-25 Thread many_years_after
class mythread(threading.Thread): def __init__(self, threadname): threading.Thread.__init__(self, name = threadname) def run(self): print 'i am running' print 'i quit run()' thread = mythread('1') thread.start() print threading.activeCount() ## 1 , this means the