from threading import Thread from time import sleep class test(Thread): def run(self): print "starting..." sleep(2) print "done" test().start()