Threaded Example
from threading import Thread
class Retriever(Thread):
    def __init__(self, URL):
        self.URL = URL
        Thread.__init__(self)
    def run(self):
        self.page = self.getPage()

retriever = Retriever('http://www.foo.com/')
retriever.start()
while retriever.isAlive():
    sleep(1)
URLs = retriever.getLinks()


Prev - TOC - Next
Slide 9 of 10