# lib_test.py: from wrapt_timeout_decorator import * from time import sleep from conf_my_program import conf_my_program # use_signals = False is not really necessary here, it is set automatically under Windows # but You can force NOT to use Signals under Linux @timeout(5, use_signals=False) def mytest(): print("Start ", conf_my_program.name) for i in range(1,10): sleep(1) print("{} seconds have passed".format(i)) return i