#! /usr/bin/python # To change this template, choose Tools | Templates # and open the template in the editor. __author__="bjschuma" __date__ ="$Dec 19, 2009 9:30:59 PM$" from threading import Thread class Needle(Thread): def __init__(self, func, args=None): Thread.__init__(self) self.func = func self.args = args def run(self): if self.args==None: self.func() else: self.func(self.args)