Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用xmlrpclibPython 进行交互aria2以管理要下载的文件。
xmlrpclib
aria2
在文档中,示例中显示的唯一选项是:dir.
dir
我也可以out用来指定文件名,现在我想知道如何配置-timeout和--connect-timeout.
out
-timeout
--connect-timeout
我试过timeoutand connect_timeout,但这不起作用。
timeout
connect_timeout
您需要在socket库级别设置超时:
socket
import socket socket.setdefaulttimeout(<your_value>)
该值将由xmlrpclib.