Unfortunately, it doesn't seem like there is an easy way to get bytes from byte numbers.
Are you adding really large files to this tar file? If not, I would update the progress on a file basis, since as you add files to tar, the progress will be updated depending on the size of each file.
, toadd tarfile tarfile. ,
from itertools import imap
from operator import attrgetter
tarobjs = imap(tarfile.getattrinfo, toadd)
total = sum(imap(attrgetter('size'), tarobjs))
complete = 0.0
for tarobj in tarobjs:
sys.stdout.write("\rPercent Complete: {0:2.0d}%".format(complete))
tarfile.add(tarobj)
complete += tarobj.size / total * 100
sys.stdout.write("\rPercent Complete: {0:2.0d}%\n".format(complete))
sys.stdout.write("Job Done!")