Can I add timepout for ftps connection and each command on ftp server ?
r = ftpslib.FTP_TLS() ...
Can I add timepout for ftps connection and each command on ftp server ?
r = ftpslib.FTP_TLS() ...
In python >= 2.6, the timeout option has been added to FTPconstructor. It will be used for each blocking operation (ie connection, receive, sending...).
In python >= 2.7, the FTP_TLS object has been added (with timeout).
In python < 2.7, you'll have to modify the default global timeout on socket module with socket.setdefaulttimeout(timeout) before creating the FTP or FTP_TLS object.