import threading
import time
from sys import stdout
class mythread(threading.Thread):
def __init__(self,threadname):
threading.Thread.__init__(self, name = threadname)
def run(self):
for i in range(10):
print(self.getName(),i)
time.sleep(1)
thread1 = mythread('mythread')
thread1.start()
running = threading.currentThread()
time.sleep(5)
for i in range(5):
stdout.write(str(i)+'\t')
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
你的笑就像潘金莲开窗户那一刻似的