testThreadが見つからないというメッセージが出てきたのですが、どこに問題があるのでしょうか?
よろしくお願いします
コード #-*- coding utf-8-*- import threading import time import datetime class TestThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): print"=== start sub thread===" for i in range(5): time.sleep(5) print "sub thread :"+str(datetime.datetime.today()) print" === end sub thread===" if __name__== "__main__": th=TestThread() th.start() time.sleep(1) print "=== start main thread ===" for i in range(5): time.sleep(10) print "main thread :"+str(datetime.datetime.today()) print" === end main thread ==="
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/01/23 02:38
2016/01/23 02:52