'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 = int(percentDone)
    allFull = (self.__width - 2)
    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 = str(percentDone)
    if (percentDone == 100):
        percentString += '%'
    else:
        percentString += '%    '
    self.__progBar = ('%s    %s' % (percentString, self.__progBar))
