def signalHandler(signum, frame):
 raise Timeout('Timeout exceed!')

def signalHandler ( signum , frame ) : raise Timeout ( 'Timeout exceed!' )
signal handler to catch timeout signal: raise timeout exception .