当前位置: 代码迷 >> 综合 >> python 超时跳过
  详细解决方案

python 超时跳过

热度:13   发布时间:2024-01-28 01:39:17.0

下载大量数据时很好用

import eventlet  
eventlet.monkey_patch()   
with eventlet.Timeout(2, False):   #超时时间为2秒# do print('ok')
print('fail')

 

  相关解决方案