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')
