Re: [Tutor] socket timeout

2009-11-28 Thread Stefan Lesicnik
- "Sander Sweers" wrote: > 2009/11/27 Stefan Lesicnik : > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > #s.setdefaulttimeout(1) > > s.connect((proxy,port)) > > I have never used socket but a quick look at the docs [1] my guess is > that you should use use s.settimeout() [2

Re: [Tutor] socket timeout

2009-11-27 Thread Sander Sweers
2009/11/27 Stefan Lesicnik : > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > #s.setdefaulttimeout(1) > s.connect((proxy,port)) I have never used socket but a quick look at the docs [1] my guess is that you should use use s.settimeout() [2]. The docs say that setdefaulttimeout [3] wi

[Tutor] socket timeout

2009-11-26 Thread Stefan Lesicnik
Hi guys, Maybe someone can point me in the right direction, since i'm not sure why i cant get the timeout to work. Admittedly i don't know much about socket programming. Im using the below code... s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #s.setdefaulttimeout(1) s.connect((pro

Re: [Tutor] Socket Timeout Handling

2007-09-11 Thread wormwood_3
Ok, just found your message in the archives. Thanks very much for that! By way of response-- >>That may be because your question ventures into fairly deep areas of >> networking >> that most folk who are just learning Python(ie readers of this list) >> have probably >> not encountered. True

Re: [Tutor] Socket Timeout Handling

2007-09-11 Thread wormwood_3
>I did send you a response and it is listed on the gmane archive >so if you didn't see it something has gone adrift somewhere. Just searched all my mail, for some reason I did not get this. I will check the archive. Thanks! >The solution you posted seems to bear no resemblence >to the problem yo

Re: [Tutor] Socket Timeout Handling

2007-09-11 Thread Alan Gauld
"wormwood_3" <[EMAIL PROTECTED]> wrote > Have not gotten any responses on this, I did send you a response and it is listed on the gmane archive so if you didn't see it something has gone adrift somewhere. > But, I did find a decent recipe on ASPN that serves the purpose, The solution you posted

Re: [Tutor] Socket Timeout Handling

2007-09-10 Thread wormwood_3
- Original Message From: wormwood_3 <[EMAIL PROTECTED]> To: Python Tutorlist Sent: Thursday, September 6, 2007 4:46:08 PM Subject: Re: [Tutor] Socket Timeout Handling Since no one bit on this yet, let me simplify to the core issue I am having: What is the best practice for checkin

Re: [Tutor] Socket Timeout Handling

2007-09-06 Thread Alan Gauld
"wormwood_3" <[EMAIL PROTECTED]> wrote > Since no one bit on this yet, let me simplify to the core issue I am > having: That may be because your question ventures into fairly deep areas of networking that most folk who are just learning Python(ie readers of this list) have probably not encount

Re: [Tutor] Socket Timeout Handling

2007-09-06 Thread wormwood_3
: wormwood_3 <[EMAIL PROTECTED]> To: Python Tutorlist Sent: Thursday, September 6, 2007 9:40:21 AM Subject: [Tutor] Socket Timeout Handling I am trying to figure out the optimal way to make socket connections (INET) and check for timeouts. The socket module has settimeout(timeou

[Tutor] Socket Timeout Handling

2007-09-06 Thread wormwood_3
I am trying to figure out the optimal way to make socket connections (INET) and check for timeouts. The socket module has settimeout(timeout) and setdefaulttimeout(timeout). However, so far as I can tell, these apply to socket objects. The type of socket connection I want to make is getfqdn(add