[EMAIL PROTECTED] wrote: > Hi, > I can successfully upload and download files using Stefan's Schwarzer's > ftputil script. > > The problem is that as some of the files are quite large you cannot see > how much has been downloaded/uploaded. > Even a percentage or just dots going across the screen would be better > than nothing. > > Does anyone have an example on how to show the progress of the > upload/download when using ftputil? > > Thanks in advance. > > Kind regards > Ian Cook > > try this
def _reporthook(numblocks, blocksize, filesize, url=None): base = os.path.basename(url) try: percent = min((numblocks*blocksize*100)/filesize, 100) except: percent = 100 if numblocks != 0: print str(percent)+'%') -- http://mail.python.org/mailman/listinfo/python-list