'This method updates the progress bar'

def update(self, newAmount=0):

    if (newAmount < self._min):
        newAmount = self._min
    elif (newAmount > self._max):
        newAmount = self._max
    self._amount = newAmount
    diffFromMin = float((self._amount - self._min))
    percentDone = ((diffFromMin / float(self._span)) * 100.0)
    percentDone = round(percentDone)
    percentDone = min(100, int(percentDone))
    allFull = (self._width - len(('100%%    []    %s/%s        ETA    00:00' % (self._max, self._max))))
    numHashes = ((percentDone / 100.0) * allFull)
    numHashes = int(round(numHashes))
    if (numHashes == 0):
        self._progBar = ('[>%s]' % ('    ' * (allFull - 1)))
    elif (numHashes == allFull):
        self._progBar = ('[%s]' % ('=' * allFull))
    else:
        self._progBar = ('[%s>%s]' % (('=' * (numHashes - 1)), ('    ' * (allFull - numHashes))))
    percentString = (getUnicode(percentDone) + '%')
    self._progBar = ('%s    %s' % (percentString, self._progBar))
