'Show or step for progress indicator'

def heartbeat(self):

    if (not self.pos):
        sys.stdout.write((('\nINFO            [#' + ('    ' * self.maxpos)) + ']    Waiting    on    the    server...\r\x1b[8C'))
    self.pos += self.delta
    if (self.delta > 0):
        s = ('    #\x1b[1D' if (self.pos > 1) else '#    \x1b[2D')
    else:
        s = '\x1b[1D#    \x1b[2D'
    sys.stdout.write(s)
    sys.stdout.flush()
    if (self.pos > self.maxpos):
        self.delta = (-1)
    elif (self.pos < 2):
        self.delta = 1
