Created
June 14, 2011 10:56
-
-
Save whilp/1024678 to your computer and use it in GitHub Desktop.
Test if an IP is active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import socket | |
>>> s = socket.socket(socket.AF_INET) | |
>>> s.bind(("127.0.0.1", 0)) | |
>>> s.bind(("10.0.0.1", 0)) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "<string>", line 1, in bind | |
socket.error: [Errno 22] Invalid argument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment