POP connection timeout.

Aspersieman aspersieman at gmail.com
Thu May 8 14:57:53 CEST 2008


Gabriel Genellina wrote:
> Use socket.setdefaulttimeout(timeout_in_seconds) before you create the POP3 object; this value will be used by the initial connect. Once it is connected, you can set a different timeout for retrieving mail using pop.sock.settimeout(...)
> Note that setdefaulttimeout applies to ALL subsequent socket operations, not only using poplib.
> <http://docs.python.org/lib/socket-objects.html>
>
>   
Fantastic! This works thanks.

Nicol

-- 

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle. 




More information about the Python-list mailing list