SSL Socket EOF protocol violation

Josh mrbiglesworth3 at yahoo.com
Tue May 25 08:09:32 EDT 2004


I'm getting an error I dont understand.  Here is the output:

Content-Type: text/html

Traceback (most recent call last):
  File "C:\PROGRA~1\APACHE~1\APACHE2\CGI-BIN\test.py", line 12, in ?
    s.connect( host, port )
  File "<string>", line 1, in connect
TypeError: connect() takes exactly one argument (2 given)
Here is the code:

#!c:/Python23/python.exe

import socket

print "Content-Type: text/html\n\n"

host = "www.paymentsgateway.net"
port = 6051

s = socket.socket( socket.AF_INET, socket.SOCK_STREAM )

s.connect( host, port )

ssl_object = socket.ssl( s );


I don't understand the error, because I think connect takes 2 
arguments according to the docs at the python.org site.  Thanks for 
any help, Josh





More information about the Python-list mailing list