On Mon, Jul 20, 2009 at 5:01 PM, Amit Sethi <amit.pureene...@gmail.com>wrote:
> Hi , I am writing a python gtk application in which I am required to > fetch a large amount of data from web , now i want to create a wait > dialog for the user to know that I am still fetching data .The > question is how can i monitor that the required data has been fetched > . I could have a variable that is given a particular value when data > has been fetched . But how can I keep checking if the variable has > got a value or not. It really depends on how you're fetching the data. If you write your own method to read a few kilobytes at a time, you can easily update a status bar. Otherwise if you know the file it's downloading to (i.e. not a temp file) you could continually call os.stat to update the status bar (especially if you know the size it's supposed to be in the end). HTH, Wayne
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor