def progress_bar(prog, mesg='Please wait...'):
    """
    progressbar(prog, mesg='Please wait...')

    Presents a nice progress bar and a text message.

    Original code by user aviraldg on StackOverflow:
    http://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console
    """
    print(' ' * int(40), end='')
    print('\r[{0}{1}] {2}% - '.format('#' * int(prog / 10), ' ' * int((100 -
        prog) / 10), prog) + str(mesg), end='')
    return None
