- 51 名前:デフォルトの名無しさん mailto:sage [2012/03/24(土) 07:06:00.64 ]
- >>46
マルチスレッドの話をしていると考えて、こんなかんじ。 1時間ごとじゃテストが動作チェックが面倒なので10秒ごとにしてある。 import threading, time, datetime def disptime(): while True: t = datetime.datetime.now() if t.second % 10 == 0: print t.strftime('%H:%M:%S') time.sleep(1); t1 = threading.Thread(target=disptime) t1.daemon = True t1.start() while True: x = raw_input() if x == '1': print"0ne"
|

|