title: TypeError: Connect() takes exactly one argument
body: <p>I'm creating an extremely simple python script designed to open a TCP socket and send some JSON data. (I'm new to python)</p>
  
  <p>I'm recieving an error below when I run the script:</p>
  
  <pre><code>Traceback (most recent call last):
    File "JSONTest.py", line 17, in &lt;module&gt;
      s.connect('10.12.0.30', 6634)
    File "/usr/lib/python2.7/socket.py", line 224, in meth
      return getattr(self._sock,name)(*args)
  TypeError: connect() takes exactly one argument (2 given)
  </code></pre>
  
  <p>My script is below:</p>
  
  <pre><code>#Imports
  import socket
  import json
  import time
  
  data = "{\"method\": \"echo\",\"id\": \"echo\",\"params\": []}"
  
  #Create socket
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  
  #Establish TCP session via IP address and port specified
  s.connect('10.12.0.30', 6634)
  
  #Send JSON to socket
  s.send(json.dumps(data))
  
  #Wait for response and print to console
  result = json.loads(s.recv(1024))
  #print str(result)
  
  #Exit
  s.close()
  </code></pre>
  
  <p>I've checked the documentation on the socket library and connect() lists only a single argument, namely the destination IP address desired. So, my question is, how can I do the above, where I'm also specifying my TCP port, if the connect() method won't allow me to input it there?</p>
  
  <p>I'm also open to input on better ways to accomplish this.</p>