import random


def strictExp(min_wait,max_wait,mu=1):
    """
    Returns an exponentially distributed time strictly between two bounds.
    """
    while True:
        x = random.expovariate(mu)
        increment = (max_wait-min_wait)/(mu*6.0)
        result = min_wait + (x*increment)
        if result<max_wait:
            break
    return result