创建线程

import threading
import thread

class userProcess(threading.Thread):
   
    def __init__(self,data):
        threading.Thread.__init__(self)
     
        self.data = data
      
    def run(self):

   pass

if __name__ == '__main__':

  data=['ggg']

  processThread = userProcess(data)
      processThread.start()

posted @ 2012-11-21 16:52  李伯波  阅读(101)  评论(0编辑  收藏  举报