fdutils/decorators.py
def delay(d, after=0):
    """ decorator to add a delay before an action. A delay after is also added If after is given.
    :param float d: delay to add before in seconds
    :param float after: delay to after the action in seconds

    """
    before = abs(d)
    after = abs(after)

    def deco_delay(func):
        @wraps(func)
        def f(*args, **kwargs):
            bef_local = before
            time.sleep(bef_local)
            ret = func(*args, **kwargs)
            if after:
                bef_local = after
            time.sleep(bef_local)
            return ret
        return f
    return deco_delay
 decorator to add a delay before an action. A delay after is also added If after is given.
    :param float d: delay to add before in seconds
    :param float after: delay to after the action in seconds

    
decorator to add a delay before an action. A delay after is also added If after is given.
decorator to add a delay before an action . A delay after is also added If after is given .
def delay(d, after=0):
    before = abs(d)
    after = abs(after)
    def deco_delay(func):
        @wraps(func)
        def f(*args, **kwargs):
            bef_local = before
            time.sleep(bef_local)
            ret = func(*args, **kwargs)
            if after:
                bef_local = after
            time.sleep(bef_local)
            return ret
        return f
    return deco_delay
def delay ( d , after = 0 ) : before = abs ( d ) after = abs ( after ) def deco_delay ( func ) : @ wraps ( func ) def f ( * args , ** kwargs ) : bef_local = before time . sleep ( bef_local ) ret = func ( * args , ** kwargs ) if after : bef_local = after time . sleep ( bef_local ) return ret return f return deco_delay
decorator to add a delay before an action.
decorator to add a delay before an action .
""" decorator to add a delay before an action. A delay after is also added If after is given.
    :param float d: delay to add before in seconds
    :param float after: delay to after the action in seconds

    """
d
delay to add before in seconds
delay to add before in seconds
after
delay to after the action in seconds
delay to after the action in seconds