All pastes #97354 Raw Edit

Mine

public text v1 · immutable
#97354 ·published 2006-07-23 17:04 UTC
rendered paste body
def downloadProgress(self,progress, status, filename, size):
		if status == 0:
			sys.stdout.write("  Downloading file: '"+filename+"' "+str(size)+"\n\t% 000")
			sys.stdout.flush()
		elif status==1:
			if progress > 0:
				sys.stdout.write("\b\b\b")
				sys.stdout.write( "%03i" % progress)
				sys.stdout.flush()
		elif status==2:
			sys.stdout.write("\b\b\b")
			print "100"
			print "   [Finished]\n"
			sys.stdout.flush()
		elif status==-1:
			print "\n  Download failed!"
			sys.stdout.flush()
		return True