On Sun, Apr 7, 2013 at 11:32 AM, Matthew Ngaha <chigga...@gmail.com> wrote:
> the whole program depends on the urlretrieve 3rd argument, the > function to be called.. is there no options to include a callback? > > def _download(self): > > def reporthook(pos, block, total): > if self.size != total: > self._size = total > self.on_size.emit() > self.progress = float(pos*block)/float(total) > > urllib.urlretrieve(self._url, self._filename, reporthook) > ##3rd arg calls inner function > self.running = False > You might want to look at requests module: http://docs.python-requests.org/en/latest/ Many people think it is easier to use than the native python support. > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Joel Goldstick http://joelgoldstick.com
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor