2009/11/27 Stefan Lesicnik <ste...@lsd.co.za>: > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > #s.setdefaulttimeout(10000) > 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] will only be applied to *new* socket object. You set the default after creating the socket object. Greets Sander [1] http://docs.python.org/library/socket.html [2] http://docs.python.org/library/socket.html#socket.socket.settimeout [3] http://docs.python.org/library/socket.html#socket.setdefaulttimeout _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor