The original version from https://code.google.com/p/python-progressbar