at line "for j in  linkReturned:" , raise an error:
File "C:\pythonProgram\test.py", line 308, in main
    for j in  linkReturned:
TypeError: iteration over non-sequence
how can I get a list from the return of thread.start() ?
below is the codes:
class PrintThread(threading.Thread):
  def __init__(self, urlList):
      threading.Thread.__init__(self)
      urllist=[]
      self.urllist=urlList
   def run(self):
      urllink=[]
      ......
      return urllink


for i in range(0,2):
        thread=PrintThread(links)
        threadList.append(thread)
    linkReturned=[]
    for i in threadList:
        linkReturned=i.start()
        for j in  linkReturned:
            links.append(j)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to