title: Python Socket timeout error
body: <p>I am writing a very simple udp socket connection in Python 2.7 </p>
  
  <p>The server side is up and running.
  I have trouble on the client side.</p>
  
  <pre><code>from socket import *
  
  serverName = '127.0.0.1'
  serverPort = 5444
  counter = 1;
  
  while counter &lt; 55:
      mySocket = socket(AF_INET,SOCK_DGRAM)
  
      try:
          mySocket.settimeout(1.0)
          message = raw_input('')
          mySocket.sendto(message,(serverName, serverPort))
          modifiedMessage, serverAddress = mySocket.recvfrom(1024)
      except mySocket.timeout:
          print 'Request timed out!'
          mySocket.close()
      else:   
          print 'Server Response:  '
          print modifiedMessage   
  
      mySocket.close()
  </code></pre>
  
  <p>I am getting the following error.
  except mySocket.timeout:
  AttributeError: '_socketobject' object has no attribute 'timeout'</p>
  
  <p>I can't understand how come there is no timeout attribute?!</p>
  
  <p>In fact I am looking at the intelisense and there is no such attribute too.</p>
  
  <p>Any suggestion will be greatly appreciated</p>