Re: Keeping a function from taking to long--threads?

2006-03-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Thanks, however, I forgot to mention that I'm using windows, and from what > I've tried, the setdefaulttimeout function doesn't work on my machine. > Again, thanks for your help! > Brandon McGinty > What version of Python are you running? Under 3.4 setdefaulttimeout() w

Re: Keeping a function from taking to long--threads?

2006-03-20 Thread Rene Pijlman
<[EMAIL PROTECTED]>: >I'm using windows, and from what I've tried, the setdefaulttimeout >function doesn't work on my machine. It should. It does on mine. -- René Pijlman Wat wil jij leren? http://www.leren.nl -- http://mail.python.org/mailman/listinfo/python-list

RE: Keeping a function from taking to long--threads?

2006-03-19 Thread brandon.mcginty
OTECTED] > rg] On Behalf Of Rene Pijlman > Sent: Sunday, March 19, 2006 5:33 PM > To: python-list@python.org > Subject: Re: Keeping a function from taking to long--threads? > > > <[EMAIL PROTECTED]>: > >Just wondering if anyone knows of a way to keep a function,

Re: Keeping a function from taking to long--threads?

2006-03-19 Thread Rene Pijlman
<[EMAIL PROTECTED]>: >Just wondering if anyone knows of a way to keep a function, >E.g. socket.gethostbyaddr("12.34.56.78"), >>From taking to long-if it's run for more than 1 second, the function >gethostbyaddr will be terminated? import socket socket.setdefaulttimeout(1) -- René Pijlman Wat wi

Keeping a function from taking to long--threads?

2006-03-19 Thread brandon.mcginty
Hi All, Just wondering if anyone knows of a way to keep a function, E.g. socket.gethostbyaddr("12.34.56.78"), >From taking to long-if it's run for more than 1 second, the function gethostbyaddr will be terminated? I was thinking about using threads, but I can't seem to get the hang of them. I've tr