In message <[EMAIL PROTECTED]>, James Mills wrote: > Try spawning a new process to run your query in.
One approach might be to have two processes: the worker process and the watcher process. The worker does the work, of course. Before performing any call that may hang, the worker sends a message to the watcher: "if you don't hear back from me in x seconds, kill me". It then does the call. After the call, it sends another message to the watcher: "OK, I'm back, cancel the timeout". -- http://mail.python.org/mailman/listinfo/python-list