What is the Python equivalent of PHP's set_time_limit()?

DrAlbertHofmann

New Member
I have a python script which is freezing (I think it stalls waiting for socket data somewhere), but I am having trouble getting a backtrace because the only way to stop it is to kill the process in. There is a timeout on the socket also, but it doesn't seem to work.I am hoping that Python has a feature like PHP's set_time_limit() function which can stop the script and give me a useful backtrace, perhaps showing a \[code\]sock.recv()\[/code\] call which is frozen, or an endless loop somewhere.
 
Back
Top