noamraph/tqdm — pull request #4 by jlowin (2014-01-14 19:14:55+00:00)
Title: Use backspace (\b) instead of carriage return (\r)

tqdm uses `\r` to clear the most recently printed line. However, if the console width is less than the length of the string, then the string is printed on multiple lines and `\r` doesn't work -- it actually leaves artifacts behind.

By using backspace `\b` for each printed character, tqdm can clear output over multiple lines.

Note this problem can arise either because the string is long or the console width has been made artificially short.

Example:

```python
long_desc = 'A very long' + '.' * 100 + 'description!'
for i in tqdm.tqdm(xrange(10000), desc=long_desc):
time.sleep(0.0001)

```