Created
June 14, 2011 14:04
-
-
Save edsu/1024956 to your computer and use it in GitHub Desktop.
check to see if i can bind to a port
This file contains hidden or 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, socket.SOCK_STREAM) | |
| >>> s.bind(('localhost', 8080)) | |
| >>> s.listen(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment