Show how much work was done / how much work is remaining.

    Parameters
    ----------
    total : float
        The total amount of work
    current : float
        The work that has been done so far
    start_time : int
        The start time in seconds since 1970 to estimate the remaining time.

def print_status(total, current, start_time=None):
    """
    Show how much work was done / how much work is remaining.

    Parameters
    ----------
    total : float
        The total amount of work
    current : float
        The work that has been done so far
    start_time : int
        The start time in seconds since 1970 to estimate the remaining time.
    """
    percentage_done = float(current) / total
    sys.stdout.write("\r%0.2f%% " % (percentage_done * 100))
    if start_time is not None:
        current_running_time = time.time() - start_time
        remaining_seconds = current_running_time / percentage_done
        tmp = datetime.timedelta(seconds=remaining_seconds)
        sys.stdout.write("(%s remaining)   " % str(tmp))
    sys.stdout.flush()