def counter(xs, delay=1):
    """print the elements of xs, waiting delay seconds in between"""
    for x in xs:
        print x
        time.sleep(delay)
print the elements of xs, waiting delay seconds in between
recipes/Python/496735_Workaround_missed_SIGINT_multithreaded/recipe-496735.py