import threading
import time
class timer(threading.Thread):
def __init__(self,no,interval):
threading.Thread.__init__(self)
self.no=no
self.interval=interval
def run(self):
while True:
print 'Thread Object (%d), Time:%s'%(self.no,time.ctime())
time.sleep(self.interval)
def test():
threadone=timer(1,1)
threadtwo=timer(2,3)
threadone.start()
threadtwo.start()
print 'main thread'
if __name__=='__main__':
test()
when I run the above programme,an error comes out but ignored
Exception exceptions.AttributeError: '_shutdown' in <module 'threading' from
'F:
\Python25\lib\threading.pyc'> ignored
--
http://mail.python.org/mailman/listinfo/python-list