I'm no threads expert, but if you use the higher-level "threading"
module, you could try something like this:
import threading
import time
def countToTen():
for i in range(1,11):
print i
time.sleep(0.5)
child = threading.Thread(target=countToTen)
class masterThread(threading.Thread):
def run(self):
print "Master Started"
child.start()
while child.isAlive():
time.sleep(0.1)
print "Master Finished"
master = masterThread()
master.start()
---------------SCRIPT OUTPUT--------------
Master Started
1
2
3
4
5
6
7
8
9
10
Master Finished
Hope this helps.
Christian
http://www.dowski.com
--
http://mail.python.org/mailman/listinfo/python-list