TIM*_*MEX 0 python sockets http
非常简单.
>>> import socket
>>> socket.gethostbyname('http://yahoo.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
Run Code Online (Sandbox Code Playgroud)