python catch socket timeout时间:2023-03-10 02:39:53 python catch socket timeout import socket try: # do something. except socket.timeout as e: # socket timeout rely on module socket, and should be imported first. # do something to process exception