How to overwrite the previous print to stdout in python? code example
Example: python overwrite text that is already printed
for x in range(10):
print '{0}\r'.format(x),
print
for x in range(10):
print '{0}\r'.format(x),
print