def progress(value, total, width, symbol='#', empty=' '):
    """Get a string representing the progress."""
    frac = 1. * value / total
    pixels = round(frac * width)
    left_pixels = width - pixels
    return '[' + (symbol * pixels) + (empty * left_pixels) + ']'