I might be missing something silly, but ive ran my code in pythonwin and it works, but when I run it in command-line it freaks
import time, thread
def print_t(name, delay):
while 1:
time.sleep(delay)
print name
try:
thread.start_new_thread(print_t,("First Message",1,))
thread.start_new_thread(print_t,("Second Message",2,))
except Exception as e:
print e
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr
import pdb;pdb.pm()will open the debugger at the point of the last exception.