max time wait for a function

2010-05-18 Thread pacopyc
Hi, I've a question for you. I'd like to call a function and waiting its return value for a time max (30 sec). The function could not respond and then I must avoid to wait for infinite time. OS is Windows XP. Can you help me? Thank -- http://mail.python.org/mailman/listinfo/python-list

Re: max time wait for a function

2010-05-18 Thread Albert Hopkins
On Tue, 2010-05-18 at 02:45 -0700, pacopyc wrote: Hi, I've a question for you. I'd like to call a function and waiting its return value for a time max (30 sec). The function could not respond and then I must avoid to wait for infinite time. OS is Windows XP. Can you help me? Thank This is

Re: max time wait for a function

2010-05-18 Thread Bryan
pacopyc wrote: I'd like to call a function and waiting its return value for a time max (30 sec). The function could not respond and then I must avoid to wait for infinite time. OS is Windows XP. You can do that using the multiprocessing module, which is in the standard library of Python 2.6

Re: max time wait for a function

2010-05-18 Thread Terry Reedy
On 5/18/2010 6:24 AM, Albert Hopkins wrote: On Tue, 2010-05-18 at 02:45 -0700, pacopyc wrote: Hi, I've a question for you. I'd like to call a function and waiting its return value for a time max (30 sec). The function could not respond and then I must avoid to wait for infinite time. OS is