Re: Is there a better way to implement this:

2007-01-23 Thread Peter Otten
Paul Boddie wrote: > Michael Yanowitz wrote: >> >>I guess I am looking for something portable (both >> Windows and Linux) where I can abort a function after >> a certain time limit expires. > > Doing a search for "timeout function Python" on Google reveals a number > of approaches. > Using

Re: Is there a better way to implement this:

2007-01-22 Thread Paul Boddie
Michael Yanowitz wrote: > >I guess I am looking for something portable (both > Windows and Linux) where I can abort a function after > a certain time limit expires. Doing a search for "timeout function Python" on Google reveals a number of approaches. Using signals: * http://nick.vargish.o

RE: Is there a better way to implement this:

2007-01-22 Thread Michael Yanowitz
. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Benjamin Niemann Sent: Monday, January 22, 2007 11:19 AM To: python-list@python.org Subject: Re: Is there a better way to implement this: Michael Yanowitz wrote: > Hello: > >I wrote the code be

Re: Is there a better way to implement this:

2007-01-22 Thread Benjamin Niemann
Michael Yanowitz wrote: > Hello: > >I wrote the code below (much irrelevant code removed). > This doesn't quite work. What I wanted it to do was > a) Execute function ftimed, which takes a function and a timeout > in seconds. > b) This will also execute function abort() as a thread. >