title: AttributeError on socket
body: <pre><code>from socket import socket, AF_INET, SOCK_DGRAM
  import struct
  import sys
  import time
  
  TIME1970 = 2208988800L  
  
  client = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
  data = '\x1b' + 47 * '\0'
  client.sendto( data, ( sys.argv[1], 123 ))
  data, address = client.recvfrom( 1024 )
  if data:
      print 'Response received from:', address
      t = struct.unpack( '!12I', data )[10]
      t = TIME1970
      print '\tTime=%s' % time.ctime(t)
  </code></pre>
  
  <p>When I try to execute this script I'm getting the following error; please help me with this:</p>
  
  <pre><code>File "C:\Users\Wolverine\Desktop\Apcog-python prog\test.py", line 8, in ?
      client = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
  AttributeError: socket
  Traceback (innermost last):
    File "C:\Program Files (x86)\Python\Pythonwin\pywin\framework\scriptutils.py", line 301, in RunScript
      exec codeObject in __main__.__dict__
    File "C:\Users\Wolverine\Desktop\Apcog-python prog\test.py", line 8, in ?
      client = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
  AttributeError: socket
  </code></pre>