Sunday, June 6, 2010

New Quickly Widget - async downloads with two lines of code




The Ubuntu Developer's Manual team was discussing the instructional app that we should use for the manual. During this discussion, it became apparent that there wasn't a way to download from a URL that was both easy and also asynch. Instead of choosing between simple and good, Stuart made a Quickly Widget that provides a way to fetch from a URL that is both simple *and* good.

fetcher = UrlFetchProgressBox("http://identi.ca/api/statusnet/groups/timeline/8.rss")
fetcher.connect("downloaded",self.create_grid_from_feed)
So, two lines! Just say what url you want to download, and tell it the function to call when it's done.

2 comments:

  1. Hey Rick-

    Can this support rsync/zsync too?

    If so, we could use this in TestDrive to pull ISOs....

    :-Dustin

    ReplyDelete
  2. Hi Rick

    just wondering if you would be able to help me a little, what im trying to do is get a progress bar working in the web browser i have created using Python, quickly and glade.

    I have added the progressbar widget to the bottom left hand corner of the page, follow your instructions but up running the program from terminal (quickly run) the progress bar does not work but the page loads.

    Any ideas how i can solve this?

    ReplyDelete