python не создает поток?

Возможно, я упустил что-то глупое, но я запустил свой код в pythonwin, и он работает, но когда я запускаю его в командной строке, он уродов

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
5
задан Marcin 2 February 2012 в 15:32
поделиться