Hey guys, I'm trying to get a socket to work, but this code doesn't seem to fire.
#!/usr/bin/python import sys import os import socket serverHost = 'localhost' # servername is localhost serverPort = 2000 # use arbitrary port > 1024 mySocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # create a TCP socket
The error is
AttributeError: 'module' object has no attribute 'AF_INET'
Any one shed any light to it?