Example #1
0
class DownloadPoolBox(VBox):
    def __init__(self, maxthreads=3):
        VBox.__init__(self)
        self.threads = []
        self.queue = DownloadQueue()
        self.show()
        for i in range(maxthreads):
            thread = _DownloadStatus(self.queue)
            thread.start()
            self.threads.append(thread)
            self.pack_end(thread, FALSE, FALSE, 0)

    def put(self, url, path):
        self.queue.put(url, path)
Example #2
0
 def __init__(self, maxthreads=3):
     VBox.__init__(self)
     self.threads = []
     self.queue = DownloadQueue()
     self.show()
     for i in range(maxthreads):
         thread = _DownloadStatus(self.queue)
         thread.start()
         self.threads.append(thread)
         self.pack_end(thread, FALSE, FALSE, 0)