[FIXED] Re: urllib2.urlopen Progress bar

2006-01-15 Thread Ritesh Raj Sarraf
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Calling urllib2.urlopen the below mentioned way fixed my problem. try: os.chdir (sSourceDir) block_size = 4096 i = 0 count = 0 temp = urllib2.urlopen(sUrl) headers = temp.info() size = int(header

urllib2.urlopen Progress bar

2006-01-14 Thread Ritesh Raj Sarraf
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, In urllib.urlretrieve I can use reporthook to implement a progress bar. But in urllib2.urlopen I can't. I have to use urllib2.urlopen because it throws exceptions which are important to be handled where as urlretrieve is dumb. Is there a way to