downloaded = 0
while not mapObj.ready():
    for _ in range(q.qsize()):
        downloaded += q.get()
print(downloaded, 'bytes downloaded\\r', end=' ')
time.sleep(0.5)
Sharing a variable between processes