This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
import signal, time | |
from contextlib import contextmanager | |
def long_function_call(): | |
while True: | |
if time.time() % 1 == 0: | |
print '*' | |
class TimeoutException(Exception): pass |