Dear all
I've been getting a rather strange problem with the following multithreaded
code (reduced to the minimum which still results in the problem):
import threading
import re
class hey(threading.Thread):
def run(self):
print re.compile("\d+").search("hey95you").group();
thlist=[]
for tech in range(2):
thlist.append(hey())
thlist[-1].start()
for th in thlist:
th.join()
After saving this to a file (say "test.py"), if I try to run this from the
console using "python test.py", it seems to work fine, but when i try to run
it from the python interactive shell using "import test", it freezes up (if
i don't issue the join() it is fine, though). Any ideas why this is so?
Thanks
Wei Lee
--
http://mail.python.org/mailman/listinfo/python-list