Audio production torrent sites. What is a good torrent tracker specialized in music production software like DAWs and virtual instruments? I have decided to keep them from the torrent sites. I'm having a problem with urllib, urllib2 and requests, three python libraries. I use Ubuntu 10.04.4 LTS and python 2.6.5 (we can use with python) (but I had installed manually, after the problem. Hi so I am having an issue with my code (probably not urllib2 itself) but it wont create a progress bar and crashes. But downloads my file after waiting for the code to finish. Is there anyway I can prevent the hanging and possibly break down the download into smaller chunks as I have little experience with python. My code is below: def iPod1(): pb = ttk.Progressbar(orient ='horizontal',length = 200, mode ='indeterminate') pb.pack(side='top') pb.start() download = 'request = urllib2.urlopen( download) pb.start() output = open('Whited00r71-iPodTouch1G.zip', 'wb') output.write(request.read()) output.close() pb.stop tkMessageBox.showinfo(title='Done', message='Download complete. Please follow the installation instructions provided in the.html file.' The hanging/freezing of the GUI can be avoided by moving the download into its own thread. Download lagu tenda biru desy. As the GUI must not be changed from another thread than the one the Tk mainloop is running in, we have to check regularly if the download thread has finished. This is usually done by repeatedly schedule a deferred function call with the after() method on widget objects. Not reading the whole file into memory before writing it into a local file can be done with shutil.copyfileobj().
0 Comments
Leave a Reply. |