#!/usr/bin/env python import threading class MyThread(threading.Thread): def __init__(self, number=1): self.number = number threading.Thread.__init__(self) def run(self): print "This is thread number", self.number one = MyThread(1) two = MyThread(2) three = MyThread(3) one.start() two.start() three.start()