OpenSSL & Python -the Saga Continues

kenzy at my-deja.com kenzy at my-deja.com
Wed Aug 30 20:29:47 EDT 2000


Ok... I finally installed OpenSSL and Python Correctly.  I you saw in my
previous posting I was having some trouble. Now I want to see if you one
has seen this error before... my code:

#!/usr/local/bin/python
import urllib, urlparse, string, time, httplib, os, socket, mimetools

def get_temp2():
	url = httplib.HTTPS('login.isend.com')
	url.putrequest('GET', '/')
	url.putheader('Accept', 'text/html')
	url.putheader('Accept', 'text/plain')
	url.endheaders()
	errcode, errmsg, headers = url.getreply()
	print ("error code = %s" % errcode)
	f = url.getfile()
	data = f.read()
	f.close()
	print data


and this is the error:

Traceback (most recent call last):
  File "/home/kyoung/test.py", line 45, in ?
    get_temp2()
  File "/home/kyoung/test.py", line 25, in get_temp2
    url = httplib.HTTPS('login.isend.com')
  File "/usr/local/lib/python1.6/httplib.py", line 84, in __init__
    if host: self.connect(host, port)
  File "/usr/local/lib/python1.6/httplib.py", line 213, in connect
    ssl = socket.ssl(sock, self.key_file, self.cert_file)
socket.sslerror: SSL_connect error


Thank you for your time.
Ken


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list