how to run an arbitrary function with timeout?
Joseph T. Bore
jbore at tjtech.com
Tue May 18 08:16:21 EDT 2004
cappy2112 at yahoo.com (Tony C) writes:
>> # set the alarm signal handler, and set the alarm to 1 second
>> #
>> signal.signal(signal.SIGALRM, alarmHandler)
>> signal.alarm(1)
>
> This is a very interesting solution.
> However, signal.alarm() and signal.SIGALRM are not defined in my signal module
> I'm using 2.3.3
I'm using 2.2.1, but it's on unix/linux. It looks like the alarm
functionality is only available there. I guess there must be
something similar on windows, anyone have any ideas?
jb
More information about the Python-list
mailing list