Hi All Could anybody try to tell me whether it is possible to run a function only for a particular time period. In my python script I call some third party function which some time won't give results. I would like to write the script in such a way that, it will wait for the result from this function for some time, say 10 seconds, and if it fails to get any results within that time (10 seconds), the script should skip that function and stop the program.
If I simplify more, how can I run an infinite loop (like in the bottom) only for 10 seconds. a=1 i=1 while a==1: print i i += 1 -- VINU VIKRAM http://iucaa.ernet.in/~vvinuv/
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor