On Tue, May 18, 2010 at 9:22 AM, pacopyc <paco...@gmail.com> 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. > Can you help me? > > Thanks
It depends on what method you are calling? From what module? Some methods, take a timeout parameter (aka socket). You could call your method in a thread and a timeout on the thread. http://docs.python.org/library/threading.html#module-threading This very much depends on what you trying to do, as to what is the best way to go. Maybe you could give a little bit more information about what you are trying to achieve and what modules/methods you trying to access. Since you posted to win32 mailing list, I am assuming you are running this windows. hth. Graeme _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32